Submission #50325951
Source Code Expand
/** _ _ __ _ _ _ _ _ _ |a ||t ||o d | |o | | __ _| | _ | __| _ | | __ |/_ | __ /__\ / _\| **/ #include <bits/stdc++.h> using namespace std; typedef long long ll; int main () { ios_base::sync_with_stdio(false); cin.tie(0); int n; cin >> n; cout << n - 1 << " " << n << " "; for (int i = n - 2; i >= 1; i--) { cout << i << " "; } for (int k = 2; k < n; k++) { if (k % 2 == 0) { for (int i = k; i <= n - 2; i++) { cout << i << " "; } cout << n << " " << n - 1 << " "; } else { for (int i = n; i >= k; i--) { cout << i << " "; } } } cout << n << "\n"; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - i i's |
User | atodo |
Language | C++ 20 (gcc 12.2) |
Score | 400 |
Code Size | 799 Byte |
Status | AC |
Exec Time | 22 ms |
Memory | 3628 KiB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 400 / 400 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example0.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, example0.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | AC | 1 ms | 3436 KiB |
001.txt | AC | 1 ms | 3488 KiB |
002.txt | AC | 1 ms | 3464 KiB |
003.txt | AC | 1 ms | 3492 KiB |
004.txt | AC | 1 ms | 3628 KiB |
005.txt | AC | 10 ms | 3432 KiB |
006.txt | AC | 1 ms | 3436 KiB |
007.txt | AC | 16 ms | 3504 KiB |
008.txt | AC | 13 ms | 3500 KiB |
009.txt | AC | 4 ms | 3432 KiB |
010.txt | AC | 2 ms | 3508 KiB |
011.txt | AC | 1 ms | 3500 KiB |
012.txt | AC | 3 ms | 3468 KiB |
013.txt | AC | 6 ms | 3404 KiB |
014.txt | AC | 6 ms | 3488 KiB |
015.txt | AC | 10 ms | 3492 KiB |
016.txt | AC | 1 ms | 3396 KiB |
017.txt | AC | 4 ms | 3412 KiB |
018.txt | AC | 21 ms | 3492 KiB |
019.txt | AC | 17 ms | 3492 KiB |
020.txt | AC | 10 ms | 3468 KiB |
021.txt | AC | 6 ms | 3464 KiB |
022.txt | AC | 12 ms | 3440 KiB |
023.txt | AC | 8 ms | 3468 KiB |
024.txt | AC | 6 ms | 3404 KiB |
025.txt | AC | 22 ms | 3384 KiB |
026.txt | AC | 22 ms | 3484 KiB |
example0.txt | AC | 1 ms | 3480 KiB |