QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#110971 | #3132. The League of Sequence Designers | owkyehfsmkbrgumpne | AC ✓ | 3ms | 3808kb | C++20 | 1.1kb | 2023-06-05 02:58:57 | 2023-06-05 02:59:00 |
Judging History
answer
#include<algorithm>
#include<iostream>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<vector>
#include<queue>
#include<cmath>
#include<map>
#include<set>
#define LL long long int
#define REP(i,n) for (int i = 1; i <= (n); i++)
#define Redge(u) for (int k = h[u],to; k; k = ed[k].nxt)
#define cls(s,v) memset(s,v,sizeof(s))
#define mp(a,b) make_pair<int,int>(a,b)
#define cp pair<int,int>
using namespace std;
const int maxn = 100005,maxm = 100005,INF = 0x3f3f3f3f;
inline int read(){
int out = 0,flag = 1; char c = getchar();
while (c < 48 || c > 57){if (c == '-') flag = 0; c = getchar();}
while (c >= 48 && c <= 57){out = (out << 1) + (out << 3) + c - 48; c = getchar();}
return flag ? out : -out;
}
int K,L;
int ans[maxn];
void work(){
int sum = 1999 + K;
printf("1999\n");
printf("-1");
for (int i = 1; i <= 1997; i++) printf(" %d",sum / 1998);
printf(" %d\n",sum - sum / 1998 * 1997);
}
int main(){
int T = read();
while (T--){
K = read(); L = read();
if (L >= 2000) puts("-1");
else work();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 3588kb
input:
3 8 3 612 7 4 2019
output:
1999 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok (3 test cases)
Test #2:
score: 0
Accepted
time: 2ms
memory: 3808kb
input:
5 8 1999 612 1999 1 1999 1000000000 1999 7777777 1999
output:
1999 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok (5 test cases)
Test #3:
score: 0
Accepted
time: 1ms
memory: 3568kb
input:
5 7777778 1999 2 1999 999999999 1999 999995 1999 999996 1999
output:
1999 -1 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 3893 38...
result:
ok (5 test cases)
Test #4:
score: 0
Accepted
time: 3ms
memory: 3668kb
input:
5 999997 1999 999998 1999 999999 1999 1000000 1999 1000001 1999
output:
1999 -1 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 ...
result:
ok (5 test cases)
Test #5:
score: 0
Accepted
time: 1ms
memory: 3516kb
input:
5 1000002 1999 1000003 1999 1000004 1999 1000005 1999 1999990 1999
output:
1999 -1 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 ...
result:
ok (5 test cases)
Test #6:
score: 0
Accepted
time: 2ms
memory: 3592kb
input:
5 1999991 1999 1999992 1999 1999993 1999 1999994 1999 1999995 1999
output:
1999 -1 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 10...
result:
ok (5 test cases)
Test #7:
score: 0
Accepted
time: 3ms
memory: 3584kb
input:
5 1999996 1999 1999997 1999 1999998 1999 1999999 1999 2000000 1999
output:
1999 -1 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 1001 10...
result:
ok (5 test cases)
Test #8:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
5 2000001 1999 2000002 1999 2000003 1999 2000004 1999 2000005 1999
output:
1999 -1 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 10...
result:
ok (5 test cases)
Test #9:
score: 0
Accepted
time: 1ms
memory: 3452kb
input:
5 2000006 1999 2000007 1999 2000008 1999 2000009 1999 2000010 1999
output:
1999 -1 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 1002 10...
result:
ok (5 test cases)
Test #10:
score: 0
Accepted
time: 1ms
memory: 3700kb
input:
5 4 1999 16 1999 32 1999 64 1999 128 1999
output:
1999 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok (5 test cases)
Test #11:
score: 0
Accepted
time: 2ms
memory: 3592kb
input:
5 256 1999 512 1999 1024 1999 2048 1999 4096 1999
output:
1999 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok (5 test cases)
Test #12:
score: 0
Accepted
time: 2ms
memory: 3556kb
input:
5 8192 1999 16384 1999 32768 1999 65536 1999 131072 1999
output:
1999 -1 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ...
result:
ok (5 test cases)
Test #13:
score: 0
Accepted
time: 3ms
memory: 3760kb
input:
5 262144 1999 524288 1999 1048576 1999 2097152 1999 4194304 1999
output:
1999 -1 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 132 ...
result:
ok (5 test cases)
Test #14:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
5 8388608 1999 16777216 1999 33554432 1999 67108864 1999 134217728 1999
output:
1999 -1 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 4199 41...
result:
ok (5 test cases)
Test #15:
score: 0
Accepted
time: 3ms
memory: 3516kb
input:
5 268435456 1999 536870912 1999 999999997 1999 223092870 1999 999999929 1999
output:
1999 -1 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 134353 13435...
result:
ok (5 test cases)
Test #16:
score: 0
Accepted
time: 3ms
memory: 3592kb
input:
5 3 1999 5 1999 6 1999 7 1999 8 1999
output:
1999 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok (5 test cases)
Test #17:
score: 0
Accepted
time: 2ms
memory: 3576kb
input:
1 9 1999
output:
1999 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
result:
ok (1 test case)