Submission #86259

#TimeUsernameProblemLanguageResultExecution timeMemory
86259MatesV13Pohlepko (COCI16_pohlepko)C++11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; long long n, m; string word, path, iznos[2000][2000]; char unos[2000][2000]; int main (){ ios::sync_with_stdio(0); cin.tie(0); cin >> n >> m; for (int i=0;i<n;i++){ cin >> word; for(int j=0;j<m;j++){ unos[i][j] = word[j]; } } path = unos[0][0]; int i=0, j=0; while (i!=n-1 and j!=m-1){ if (unos[i][j+1] > unos[i+1][j]){ i++; path = path + unos[i][j]; } else if (unos[i][j+1] > unos[i+1][j]){ j++; path = path + unos[i][j]; } else } while (i!=n-1){ i++; path = path + unos[i][j]; } while (j!=m-1){ j++; path = path + unos[i][j]; } cout << path; return 0; }

Compilation message (stderr)

pohlepko.cpp: In function 'int main()':
pohlepko.cpp:28:2: error: expected primary-expression before '}' token
  }
  ^