Submission #19711758


Source Code Expand

Copy
#include <bits/stdc++.h>
#define LL long long
#define pb push_back
#define st first
#define nd second
#define INF 0x3f3f3f3f
#define LINF 0x3f3f3f3f3f3f3f3f
template <class T> T read(T &a) {
    a=0;char x=getchar();bool f=0;
    for(;x<'0'||x>'9';x=getchar())f|=x=='-';
	for(;x>='0'&&x<='9';x=getchar())a=(a<<3)+(a<<1)+x-'0';
    if(f)a=-a;
    return a;
}
using namespace std;

int main() {
	int n;
	read(n);
	for (int i = 1; i <= n; ++i) {
		int x = i * 2, y = i * 2 + 1;
		while (x > n) x -= n;
		while (y > n) y -= n;
		printf("%d %d\n", x, y);
	}
    return 0;
}

Submission Info

Submission Time
Task A - AtCoder Jumper
User jiaangk
Language C++ (GCC 9.2.1)
Score 500
Code Size 596 Byte
Status AC
Exec Time 13 ms
Memory 3712 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 500 / 500
Status
AC × 2
AC × 12
Set Name Test Cases
Sample example0.txt, example1.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, example0.txt, example1.txt
Case Name Status Exec Time Memory
000.txt AC 13 ms 3540 KB
001.txt AC 2 ms 3548 KB
002.txt AC 2 ms 3596 KB
003.txt AC 6 ms 3636 KB
004.txt AC 3 ms 3540 KB
005.txt AC 2 ms 3712 KB
006.txt AC 2 ms 3648 KB
007.txt AC 2 ms 3640 KB
008.txt AC 2 ms 3596 KB
009.txt AC 2 ms 3540 KB
example0.txt AC 6 ms 3592 KB
example1.txt AC 2 ms 3608 KB