| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1319840 | Jawad_Akbar_JJ | Weighting stones (IZhO11_stones) | C++20 | 0 ms | 332 KiB |
#include <iostream>
using namespace std;
int pre[1<<17];
int main(){
int n;
cin>>n;
for (int i=1, a, b;i<=n;i++){
cin>>a>>b;
for (int j=a;j>=1;j--)
pre[j] += (b == 1 ? 1 : -1);
int mx = 0, mn = 0;
for (int j=a;j>=1;j--)
mx = max(mx, pre[j]), mn = min(mn, pre[j]);
if (mn == 0)
cout<<'>';
else if (mx == 0)
cout<<'<';
else
cout<<'?';
cout<<'\n';
}
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
