Submission #19709657


Source Code Expand

Copy
#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
//#include<ctime>
//#include<algorithm>//next_permutation
#define rep(i,n) for (ll i = 0;i < (n);i++)
#define all(v) v.begin(),v.end()
#define dec(n) cout << fixed << setprecision(n);
#define large "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define small "abcdefghijklmnopqrstuvwxyz"
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vc = vector<char>;
using vvc = vector<vc>;

const ll mod = 998244353;
const ll MAX = 2000001;
const ll inf = 2e18;

ll gcd(ll a,ll b){
  if(b == 0) return a;
  return gcd(b , a % b);
}

ll lcm(ll a,ll b){
  return (a*b)/gcd(a,b);
}




int main(){
  ll n; cin >> n;

  rep(i,n){
    cout << ((i+1)*2) % n + 1 << ' ' << ((i+1)*2 - 1) % n + 1 << endl;
  }

}

Submission Info

Submission Time
Task A - AtCoder Jumper
User haruki4936
Language C++ (GCC 9.2.1)
Score 500
Code Size 832 Byte
Status AC
Exec Time 7 ms
Memory 3640 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 3 ms 3520 KB
001.txt AC 5 ms 3452 KB
002.txt AC 7 ms 3560 KB
003.txt AC 5 ms 3636 KB
004.txt AC 5 ms 3416 KB
005.txt AC 5 ms 3568 KB
006.txt AC 2 ms 3520 KB
007.txt AC 2 ms 3528 KB
008.txt AC 2 ms 3624 KB
009.txt AC 5 ms 3640 KB
example0.txt AC 4 ms 3592 KB
example1.txt AC 3 ms 3440 KB