QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#849162 | #3836. So I'll Max Out My Constructive Algorithm Skills | enze114514 | WA | 1ms | 3724kb | C++20 | 1.2kb | 2025-01-09 12:18:46 | 2025-01-09 12:18:46 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define pb push_back
const ld pi = 3.14159265358979323846;
const int mod = (int)1e9 + 7;
const ll INF = 1e18;
template<typename T>
T chmax(T a, T b){
return a > b ? a : b;
}
template<typename T>
T chmin(T a, T b){
return a > b ? b : a;
}
const int N = (int)2e5 + 1, M = N * 2;
void solve(){
int n;
cin >> n;
int f[n][n];
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
cin >> f[i][j];
}
}
for(int i = 0; i < n; i++){
if(i % 2 == 0){
for(int j = 0; j < n; j++){
if(i == n - 1 && j == n - 1) cout << f[i][j];
else cout << f[i][j] << " ";
}
}
else{
for(int j = n - 1; j >= 0; j--){
if(i == n - 1 && j == 0) cout << f[i][j];
else cout << f[i][j] << " ";
}
}
}
cout << endl;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int t = 1;
cin >> t;
while(t--){
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3672kb
input:
1 2 4 3 2 1
output:
4 3 1 2
result:
ok correct
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 3724kb
input:
100 9 30 75 35 51 25 19 76 65 62 11 56 63 60 77 48 28 26 74 16 44 46 41 17 8 66 61 42 29 7 43 38 40 31 27 10 39 52 23 58 80 50 20 33 69 47 79 1 5 49 22 37 71 18 70 54 72 4 64 55 34 12 6 15 14 53 45 13 32 59 73 57 81 36 3 78 24 2 68 9 67 21 7 11 28 2 19 9 41 24 17 34 5 10 42 18 47 33 35 22 8 49 1 29 ...
output:
30 75 35 51 25 19 76 65 62 74 26 28 48 77 60 63 56 11 16 44 46 41 17 8 66 61 42 39 10 27 31 40 38 43 7 29 52 23 58 80 50 20 33 69 47 70 18 71 37 22 49 5 1 79 54 72 4 64 55 34 12 6 15 81 57 73 59 32 13 45 53 14 36 3 78 24 2 68 9 67 21 11 28 2 19 9 41 24 47 18 42 10 5 34 17 33 35 22 8 49 1 29 26 7 44 ...
result:
wrong answer [case 4] Not lazy, up = 42, down = 38