Submission #148733

# Submission time Handle Problem Language Result Execution time Memory
148733 2019-09-01T05:00:40 Z 1 WA = 5 Push Up(#3624, BaaaaaaaaaaaaaaaarkingDog, IohcEjnim, 0xrgb) King of Chairs (FXCUP4_chairs) C++17
17 / 100
53 ms 3524 KB
#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 time Memory 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
# Verdict Execution time Memory 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 -
# Verdict Execution time Memory 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 -