Submission #9104

#TimeUsernameProblemLanguageResultExecution timeMemory
9104wurikijiPenalty calculation (kriii2_PE)C++98
Compilation error
0 ms0 KiB
#include <cstdio> #include <cstring> #include <string> #include <iostream> #include <vector> #include <stack> using namespace std; int main(void){ int n; cin >> n; int cnt = 0; vector<int> vt,vs; int i = 0 ; int mx = 0; while(n--){ int tt, ss; cin >> tt >> ss; vt.push_back(tt); vs.push_back(ss); if( mx < ss) { i = cnt; mx = ss; } cnt++; } int p =0; if( mx == 0) p = 0; else (mx == 1 || mx == 4){ p = vt[i] + (i - 1 ) * 20; } cout<<p<<endl; return 0; }

Compilation message (stderr)

PE.cpp: In function 'int main()':
PE.cpp:28:27: error: expected ';' before '{' token