# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
641357 | andrei_boaca | Homework (CEOI22_homework) | C++14 | 284 ms | 213796 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> pii;
stack<int> stiva;
vector<int> nr,poz;
string s;
bool possible(string op,int cnt1,int cnt2, pii p1, pii p2,int x)
{
if(op=="max")
{
if(p1.first+p2.first<=x)
{
int val=cnt1+p2.second;
if(x<=val)
return 1;
val=cnt2+p1.second;
if(x<=val)
return 1;
}
return 0;
}
else
{
int have=cnt1-p1.second+1;
have+=cnt2-p2.second+1;
if(cnt1+cnt2-x+1>=have)
{
int val=cnt1+cnt2-p2.first+1;
if(cnt1+cnt2-val+1<=x)
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |