Submission #816008

#TimeUsernameProblemLanguageResultExecution timeMemory
816008devariaotaRobots (IOI13_robots)C++17
14 / 100
95 ms4672 KiB
#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[]) { vector<int> kemampuan; if (T == 2 and A+B == 2) { for (int i = 0; i < A; i++) { for (int j = 0; j < T; j++) { if (W[j] < X[i]) kemampuan.push_back(1); else kemampuan.push_back(0); } } for (int i = 0; i < B; i++) { for (int j = 0; j < T; j++) { if (S[j] < Y[i]) kemampuan.push_back(1); else kemampuan.push_back(0); } } // for (auto i: kemampuan) cout << i << " "; // cout << endl; if (kemampuan[0] == 0 and kemampuan[2] == 0) return -1; if (kemampuan[1] == 0 and kemampuan[3] == 0) return -1; if (kemampuan[0] == 1 and kemampuan[3] == 1) return 1; if (kemampuan[1] == 1 and kemampuan[2] == 1) return 1; return 2; } return 42; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...