Submission #166126

#TimeUsernameProblemLanguageResultExecution timeMemory
166126beso123Weighting stones (IZhO11_stones)C++14
0 / 100
2 ms376 KiB
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n;
main(){
cin>>n;
int a=0,b=0;
while(n--){
  int v,r;
  cin>>v>>r;
  if(r==1)
    a+=v;
  else b+=v;
  if(a>b)
    cout<<'>'<<endl;
  if(b>a)
    cout<<'<'<<endl;
  if(a==b)
    cout<<'?'<<endl;
}
return 0;
}

Compilation message (stderr)

stones.cpp:5:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main(){
      ^
#Verdict Execution timeMemoryGrader output
Fetching results...