Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
313
reputation
2
8

Baldrickk

What does this do?

#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#define s string
#define l length()
using namespace std;int a,b,c,d,e;int main(int i,char**f){vector<s>g;vector<int>h;s j;ifstream k(f[1]);while(getline(k,j)){c=0;b=-1;for(;;){b=j.find(" ",++b);if(b==s::npos)break;c++;if(c>d)d=c;if(j.l>a)a=j.l;}g.push_back(j);h.push_back(c);}for(i=0;i<g.size();i++){c=a-g[i].l;e=h[i]?c%h[i]:0;d=b=0;j={};for(;;d=b+1){b=g[i].find(s(" "),d);j+=s(g[i],d,(b==s::npos?b:b-d+1));if(b==s::npos)break;j+=s((h[i]?c/h[i]:0)+(e?e--,1:0),' ');}cout<<j;}}
6
answers
0
questions
~22k
people reached
  • Member for 4 years, 2 months
  • 31 profile views
  • Last seen 2 days ago

Top Tags (11)

Score 11
Posts 3
Posts % 50
Score 7
Posts 1
Score 6
Posts 1
Score 6
Posts 1
Score 6
Posts 1
Score 6
Posts 1

Top Posts (6) All Questions Answers | Votes Newest

Badges (10)

Gold

Silver

2

Rarest

Bronze

8

Rarest