QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#548296 | #6819. Largest Unique Wins | code_side-effect | AC ✓ | 0ms | 3944kb | C++20 | 1.3kb | 2024-09-05 16:55:36 | 2024-09-05 16:55:37 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using i64 = long long;
const int N = 1e5+5;
int main(){
int n , m;
cin >> n >> m;
if(n >= 2*m){
for(int i = 1;i <= 2*m;i++){
for(int j = 1 ; j <= m ;j++){
if(ceil(i*1.0 / 2) == m-j+1){
cout << fixed << setprecision(10) << 1.0000000000 << " ";
}
else cout << fixed << setprecision(10) << 0.0000000000 << " ";
}
cout << "\n";
}
if(n - 2*m){
for(int i=1; i<= n - 2*m ;i++){
cout << fixed << setprecision(10) << 1.0000000000 << " ";
for(int j = 1 ;j<=m-1 ;j++){
cout << fixed << setprecision(10) << 0.0000000000 << " ";
}
cout << "\n";
}
}
}
else{
for(int i = 1;i <= n;i++){
for(int j = 1 ; j <= m ;j++){
// cerr << i/2 << " ";
if(ceil(i*1.0 / 2) == m-j+1){
cout << fixed << setprecision(10) << 1.0000000000 << " ";
}
else cout << fixed << setprecision(10) << 0.0000000000 << " ";
}
cout << "\n";
}
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3852kb
input:
2 2
output:
0.0000000000 1.0000000000 0.0000000000 1.0000000000
result:
ok ok 0.0000 0.0000
Test #2:
score: 0
Accepted
time: 0ms
memory: 3940kb
input:
3 3
output:
0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000
result:
ok ok -1.0000 -1.0000 1.0000
Test #3:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
3 2
output:
0.0000000000 1.0000000000 0.0000000000 1.0000000000 1.0000000000 0.0000000000
result:
ok ok -1.0000 -1.0000 1.0000
Test #4:
score: 0
Accepted
time: 0ms
memory: 3900kb
input:
12 12
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 ...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #5:
score: 0
Accepted
time: 0ms
memory: 3896kb
input:
12 11
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #6:
score: 0
Accepted
time: 0ms
memory: 3944kb
input:
11 12
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 ...
result:
ok ok -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 1.0000
Test #7:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
12 3
output:
0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 1.0000000000 0.00000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #8:
score: 0
Accepted
time: 0ms
memory: 3888kb
input:
2 12
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 ...
result:
ok ok 0.0000 0.0000
Test #9:
score: 0
Accepted
time: 0ms
memory: 3896kb
input:
4 12
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 ...
result:
ok ok 0.0000 0.0000 0.0000 0.0000
Test #10:
score: 0
Accepted
time: 0ms
memory: 3856kb
input:
12 4
output:
0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #11:
score: 0
Accepted
time: 0ms
memory: 3896kb
input:
3 12
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 ...
result:
ok ok -1.0000 -1.0000 1.0000
Test #12:
score: 0
Accepted
time: 0ms
memory: 3900kb
input:
4 5
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000
result:
ok ok 0.0000 0.0000 0.0000 0.0000
Test #13:
score: 0
Accepted
time: 0ms
memory: 3900kb
input:
4 9
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000
Test #14:
score: 0
Accepted
time: 0ms
memory: 3904kb
input:
9 5
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.00000000...
result:
ok ok -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 1.0000
Test #15:
score: 0
Accepted
time: 0ms
memory: 3888kb
input:
10 5
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.00000000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #16:
score: 0
Accepted
time: 0ms
memory: 3892kb
input:
11 5
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.00000000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #17:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
11 6
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.000000000...
result:
ok ok -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 1.0000
Test #18:
score: 0
Accepted
time: 0ms
memory: 3892kb
input:
12 6
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.000000000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #19:
score: 0
Accepted
time: 0ms
memory: 3896kb
input:
12 5
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.00000000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #20:
score: 0
Accepted
time: 0ms
memory: 3888kb
input:
12 7
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.000000000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #21:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
5 12
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 ...
result:
ok ok -1.0000 -1.0000 -1.0000 -1.0000 1.0000
Test #22:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
9 12
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 ...
result:
ok ok -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 1.0000
Test #23:
score: 0
Accepted
time: 0ms
memory: 3904kb
input:
12 9
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #24:
score: 0
Accepted
time: 0ms
memory: 3900kb
input:
12 10
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #25:
score: 0
Accepted
time: 0ms
memory: 3892kb
input:
10 12
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 ...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #26:
score: 0
Accepted
time: 0ms
memory: 3896kb
input:
2 3
output:
0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 1.0000000000
result:
ok ok 0.0000 0.0000
Test #27:
score: 0
Accepted
time: 0ms
memory: 3892kb
input:
2 4
output:
0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000
result:
ok ok 0.0000 0.0000
Test #28:
score: 0
Accepted
time: 0ms
memory: 3944kb
input:
2 5
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000
result:
ok ok 0.0000 0.0000
Test #29:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
12 2
output:
0.0000000000 1.0000000000 0.0000000000 1.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000 1.0...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #30:
score: 0
Accepted
time: 0ms
memory: 3892kb
input:
4 2
output:
0.0000000000 1.0000000000 0.0000000000 1.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000
result:
ok ok 0.0000 0.0000 0.0000 0.0000
Test #31:
score: 0
Accepted
time: 0ms
memory: 3900kb
input:
5 2
output:
0.0000000000 1.0000000000 0.0000000000 1.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000 1.0000000000 0.0000000000
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000
Test #32:
score: 0
Accepted
time: 0ms
memory: 3904kb
input:
7 9
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000...
result:
ok ok -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000 1.0000
Test #33:
score: 0
Accepted
time: 0ms
memory: 3904kb
input:
6 9
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Test #34:
score: 0
Accepted
time: 0ms
memory: 3856kb
input:
6 10
output:
0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 1.0000000000 0.0000000000 0.0000000000 0.0000000000...
result:
ok ok 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000