Advertisement
PikMike

Untitled

Jan 10th, 2017
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. bool read(){
  2.     if(scanf("%d", &q) != 1)
  3.         return 0;
  4.     while (getchar() != '\n');
  5.     char c;
  6.     forn(i, q){
  7.         b[i] = "";
  8.         do{
  9.             c = getchar();
  10.             if (c != '\n')
  11.                 b[i] += c;
  12.         } while (c != '\n');
  13.     }
  14.     scanf("%d", &m);
  15.     while (getchar()!='\n');
  16.     int lst = 0;
  17.     s = "";
  18.     forn(i, m){
  19.         t = "";
  20.         do{
  21.             c = getchar();
  22.             if (c != 10)
  23.                 t += c;
  24.         } while (c != 10);
  25.        
  26.         forn(j, sz(t))
  27.             pos[lst++] = mp(i + 1, j + 1);
  28.            
  29.         lst++;
  30.         s += t;
  31.         s += (char)(10);
  32.     }
  33.     n = sz(s);
  34.     return 1;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement