Submission #148733

#TimeUsernameProblemLanguageResultExecution timeMemory
1487331 WA = 5 Push Up (#200)King of Chairs (FXCUP4_chairs)C++17
17 / 100
53 ms3524 KiB
#include "king.h" //#include <bits/stdc++.h> #include <vector> using namespace std; long long SendInfo(vector<int> W, vector<int> C) { int N = W.size(); if(N > 10) return 0; vector<bool> isused(N,false); long long ret = 0; for(int i = 0; i < N; i++){ int curidx = -1; for(int j = 0; j < N; j++){ if(isused[j]) continue; if(W[i] > C[j]) continue; if(curidx == -1) curidx = j; else{ if(C[curidx] > C[j]) curidx = j; } } if(curidx != -1) isused[curidx] = true; curidx++; ret = ret*11+curidx; } return ret; }
#include "vassal.h" //#include <bits/stdc++.h> #include <vector> using namespace std; long long BB; vector<int> schedule(11); int N; int idx = -1; void Init(long long B, vector<int> C){ int N = C.size(); BB = B; for(int i = N-1; i >= 0; i--){ schedule[i] = B%11-1; B /= 11; } } int Maid(int W){ idx++; return schedule[idx]; //return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...