#include "king.h"
long long SendInfo(std::vector<int> W, std::vector<int> C) {
int N = W.size();
return 1;
}
#include "vassal.h"
#include <bits/stdc++.h>
#define fr(i, n, m) for(int i = (n); i < (m); i ++)
#define pb push_back
#define st first
#define nd second
#define pq priority_queue
#define all(x) begin(x),end(x)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
ll const inf = 1e9;
ll const mod = 1e9 + 7;
ld const eps = 1e-9;
pq<pii> Q;
int n;
void Init(long long B, std::vector<int> C){
n = C.size();
fr(i, 0, n){
Q.push({-C[i], i});
}
// ToDo
}
int Maid(int W){
while(!Q.empty() && -Q.top().st < W) Q.pop();
if(Q.empty()){
return -1;
}
else{
int id = Q.top().nd;
Q.pop();
return id;
}
}
/*
int main()
{
ll n;
int k;
cin >> n >> k;
fr(i, 0, k){
int last = n % 10;
if(last > 0) n --;
else n /= 10;
}
cout<< n << endl;
return 0;
}*/
Compilation message
king.cpp: In function 'long long int SendInfo(std::vector<int>, std::vector<int>)':
king.cpp:4:6: warning: unused variable 'N' [-Wunused-variable]
int N = W.size();
^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
1060 KB |
Correct |
2 |
Incorrect |
10 ms |
1056 KB |
Wrong |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
55 ms |
3892 KB |
Correct |
2 |
Correct |
93 ms |
6540 KB |
Correct |
3 |
Correct |
98 ms |
6856 KB |
Correct |
4 |
Correct |
99 ms |
6864 KB |
Correct |
5 |
Correct |
99 ms |
6860 KB |
Correct |
6 |
Correct |
98 ms |
6864 KB |
Correct |
7 |
Correct |
100 ms |
6856 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
57 ms |
4156 KB |
Wrong |
2 |
Halted |
0 ms |
0 KB |
- |