|
|
back to boardwhat is wrong? Posted by Levan 7 Jan 2016 18:56 i have WA #2 #include <iostream> #include <stdio.h> using namespace std; int main() { int n, m; cin >> n >> m; int win = 0; for(int i = 0; i < m; i++) { int a; cin >> a; n -= a; if(i % 2 == 0) win = 2; else win = 1; }
cout << win << endl;
return 0; } |
|
|