#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
1060 KB |
Correct |
2 |
Correct |
10 ms |
1052 KB |
Correct |
3 |
Correct |
10 ms |
1048 KB |
Correct |
4 |
Correct |
10 ms |
540 KB |
Correct |
5 |
Correct |
10 ms |
1156 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
48 ms |
3276 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
53 ms |
3524 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
2 |
Halted |
0 ms |
0 KB |
- |