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 "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 (stderr)
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();
^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |