답안 #149219

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
149219 2019-09-01T05:59:36 Z Avengers(#3759, Blagojce) King of Chairs (FXCUP4_chairs) C++17
87 / 100
154 ms 10444 KB
#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 all(x) begin(x),end(x);

using namespace std;
typedef long long ll;
#include "king.h"

long long SendInfo(std::vector<int> W, std::vector<int> C) {
	int N = W.size();
	return W[0]*100 + W[1]*10 + W[2]*1;
}

#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 all(x) begin(x),end(x);

using namespace std;
typedef long long ll;
/*#include "king.h"

long long SendInfo(std::vector<int> W, std::vector<int> C) {
	int N = W.size();
	return W[0]*100 + W[1]*10 + W[2]*1;
}
*/
#include "vassal.h"

long long BB;
set<pair<int,int> > s;
void Init(long long B, std::vector<int> C){
	int N = C.size();
	fr(i, 0, N) s.insert({C[i], i});
	BB = B;
	// ToDo
}

int Maid(int W){
        auto u = s.lower_bound({W, 1e5});
        if(u == s.end()) return -1;
        s.erase(u);
	return u->nd;
}

Compilation message

king.cpp: In function 'long long int SendInfo(std::vector<int>, std::vector<int>)':
king.cpp:13:6: warning: unused variable 'N' [-Wunused-variable]
  int N = W.size();
      ^
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 1044 KB Correct
2 Correct 10 ms 1048 KB Correct
3 Correct 11 ms 1044 KB Correct
4 Correct 10 ms 1044 KB Correct
5 Correct 11 ms 1048 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 62 ms 5936 KB Correct
2 Correct 105 ms 9540 KB Correct
3 Correct 115 ms 10324 KB Correct
4 Correct 113 ms 10432 KB Correct
5 Correct 114 ms 10440 KB Correct
6 Correct 115 ms 10436 KB Correct
7 Correct 114 ms 10436 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 76 ms 5936 KB B = 35574178
2 Partially correct 133 ms 9404 KB B = 51036769
3 Partially correct 129 ms 10440 KB B = 45057563
4 Partially correct 152 ms 10436 KB B = 3993102
5 Partially correct 154 ms 10436 KB B = 43833533
6 Partially correct 154 ms 10436 KB B = 77981288
7 Partially correct 129 ms 10440 KB B = 73794780
8 Partially correct 124 ms 10444 KB B = 48756244