# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
962760 | n3rm1n | Robots (IOI13_robots) | C++17 | 1 ms | 4444 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>
#include"robots.h"
using namespace std;
int putaway(int A,int B,int T, int X[],int Y[],int W[],int S[])
{
if(A + B == 2 && T == 2)
{
int fit00 = 0, fit01 = 0, fit10 = 0, fit11 = 0;
if(A == 2)
{
if(W[0] < X[0])fit00 ++;
if(W[1] < X[0])fit01 ++;
if(W[0] < X[1])fit10 ++;
if(W[1] < X[1])fit11 ++;
}
else if(B == 2)
{
if(S[0] < Y[0])fit00 ++;
if(S[1] < Y[0])fit01 ++;
if(S[0] < Y[1])fit10 ++;
if(S[1] < Y[1])fit11 ++;
}
else
{
if(W[0] < X[0])fit00 ++;
if(W[1] < X[0])fit01 ++;
if(S[0] < Y[0])fit10 ++;
if(S[1] < Y[0])fit11 ++;
}
if(!fit01 && !fit00)return -1;
if(!fit11 && !fit10)return -1;
if(fit01 && fit10)return 1;
if(fit00 && fit11)return 1;
return 2;
}
}
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... |