QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#470459#4783. 神秘货币oolimry12 6ms4096kbC++14932b2024-07-10 13:56:502024-07-10 13:56:51

Judging History

你现在查看的是最新测评结果

  • [2024-07-10 13:56:51]
  • 评测
  • 测评结果:12
  • 用时:6ms
  • 内存:4096kb
  • [2024-07-10 13:56:50]
  • 提交

answer

#include "currency.h"


#include <bits/stdc++.h>
using namespace std;
#define sz(x) (int) (x).size()
#define all(x) (x).begin(), (x).end()
#define show(x) cerr << #x << " is " << x << endl;
#define show2(x,y) cerr << #x << " is " << x << " " << #y << " is " << y << endl;
#define show3(x,y,z) cerr << #x << " is " << x << " " << #y << " is " << y << " " << #z << " is " << z << endl;
#define showlist(x) cerr << #x << " is "; for(auto p : x) cerr << p << " "; cerr << endl;
typedef long long lint;
typedef pair<int,int> ii;

void solve(int type){
	if(type == 4){
		vector<int> can(1001);
		can[0] = 1;
		
		vector<int> v;
		for(int i = 1;i <= 1000;i++){
			if(can[i]) continue;
			
			if(query(i)){
				for(int j = i;j <= 1000;j++) if(can[j-i]) can[j] = 1;
				v.push_back(i);
			}
		}
		
		int n = v.size();
		int ans[n] = {};
		for(int i = 0;i < n;i++) ans[i] = v[i];
		
		answer(n, ans);
	}
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3736kb

input:

1

output:


result:

wrong answer Error: Invalid interaction

Subtask #2:

score: 0
Wrong Answer

Test #6:

score: 0
Wrong Answer
time: 0ms
memory: 3736kb

input:

2

output:


result:

wrong answer Error: Invalid interaction

Subtask #3:

score: 0
Wrong Answer

Test #36:

score: 0
Wrong Answer
time: 0ms
memory: 3680kb

input:

3

output:


result:

wrong answer Error: Invalid interaction

Subtask #4:

score: 12
Accepted

Test #56:

score: 12
Accepted
time: 0ms
memory: 3868kb

input:

4
1

output:

Q 1
A 1
1

result:

ok Correct!

Test #57:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

4
0
0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 4...

result:

ok Correct!

Test #62:

score: 0
Accepted
time: 1ms
memory: 3812kb

input:

4
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0

output:

Q 1
Q 2
Q 3
Q 4
Q 5
Q 6
Q 7
Q 9
Q 10
Q 11
Q 13
Q 14
Q 15
Q 17
Q 19
Q 21
Q 23
Q 25
Q 27
Q 29
Q 31
Q 33
Q 35
Q 39
Q 43
A 3
4 14 33

result:

ok Correct!

Test #63:

score: 0
Accepted
time: 6ms
memory: 4064kb

input:

4
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

Q 1
Q 2
Q 3
Q 4
Q 5
Q 6
Q 7
Q 8
Q 9
Q 10
Q 11
Q 12
Q 13
Q 14
Q 15
Q 16
Q 17
Q 18
Q 19
Q 20
Q 21
Q 22
Q 23
Q 24
Q 25
Q 26
Q 27
Q 28
Q 29
Q 30
Q 31
Q 32
Q 33
Q 34
Q 35
Q 36
Q 37
Q 38
Q 39
Q 40
Q 41
Q 42
Q 43
Q 44
Q 45
Q 46
Q 47
Q 48
Q 49
Q 50
Q 51
Q 52
Q 53
Q 54
Q 55
Q 56
Q 57
Q 58
Q 59
Q 60
Q 61
Q 62...

result:

ok Correct!

Test #64:

score: 0
Accepted
time: 4ms
memory: 4092kb

input:

4
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0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correct!

Subtask #5:

score: 0
Wrong Answer

Test #71:

score: 0
Wrong Answer
time: 1ms
memory: 3732kb

input:

5

output:


result:

wrong answer Error: Invalid interaction

Subtask #6:

score: 0
Wrong Answer

Test #86:

score: 0
Wrong Answer
time: 0ms
memory: 3736kb

input:

6

output:


result:

wrong answer Error: Invalid interaction