Task: | Hypyt |
Sender: | Lieska |
Submission time: | 2025-10-17 19:43:39 +0300 |
Language: | C++ (C++20) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.00 s | 1, 2 | details |
#2 | ACCEPTED | 0.00 s | 1, 2 | details |
#3 | WRONG ANSWER | 0.01 s | 2 | details |
#4 | WRONG ANSWER | 0.04 s | 2 | details |
#5 | ACCEPTED | 0.04 s | 2 | details |
Code
#include <bits/stdc++.h> using namespace std; typedef long long ll; void two_rows(int r_diff, int cols){ // We start at the left-most cell of the upper row. cout << r_diff << " " << cols-1 << "\n"; for (int i=1; i<cols; ++i){ int col_1 = cols + 1 - i; int col_2 = i + 1; //cout << "here " << r_diff << " " << cols << " " << col_1 << " " << col_2 << "\n"; cout << -r_diff << " " << col_2 - col_1 << "\n"; cout << r_diff << " " << col_1 - 1 - col_2 << "\n"; } } void test(){ int n, m; cin >> n >> m; for (int i=1; 2*i<=n; ++i){ int row_diff = n-1-2*(i-1); two_rows(row_diff, m); if (2*i < n){ cout << -(row_diff-1) << " " << 0 << "\n"; } } if (n%2==1){ for (int i=1; 2*i <= m; ++i){ int col_diff = m-1-2*(i-1); cout << "0 " << col_diff << "\n"; cout << "0 " << -(col_diff-1) << "\n"; } } } int main(){ ios::sync_with_stdio(0); cin.tie(0); int tt; cin >> tt; while (tt--) test(); }
Test details
Test 1
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
25 1 1 1 2 1 3 1 4 ... |
correct output |
---|
0 1 0 2 0 -1 0 3 0 -2 ... |
user output |
---|
0 1 0 0 0 2 0 -1 0 3 ... |
Test 2
Group: 1, 2
Verdict: ACCEPTED
input |
---|
100 5 5 5 5 5 5 5 5 ... |
correct output |
---|
4 4 -4 -3 4 2 -4 -1 4 0 ... |
user output |
---|
4 4 -4 -3 4 2 -4 -1 4 0 ... |
Test 3
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 1 25 20 40 5 34 50 34 ... |
correct output |
---|
0 24 0 -23 0 22 0 -21 0 20 ... |
user output |
---|
0 24 0 -23 0 22 0 -21 0 20 ... |
Test 4
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 46 47 41 39 46 36 46 30 ... |
correct output |
---|
45 46 -45 -45 45 44 -45 -43 45 42 ... |
user output |
---|
45 46 -45 -45 45 44 -45 -43 45 42 ... |
Test 5
Group: 2
Verdict: ACCEPTED
input |
---|
100 50 50 50 50 50 50 50 50 ... |
correct output |
---|
49 49 -49 -48 49 47 -49 -46 49 45 ... |
user output |
---|
49 49 -49 -48 49 47 -49 -46 49 45 ... |