Submission #19717296


Source Code Expand

Copy
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define mod 1000000007
#define loop(x,a,n) for(ll x = a; x < n; ++x)
#define In(a,n) for(ll x = 0; x < n; ++x){cin >> a[x];}
#define TT long long int t;cin >> t; while(t--)
#define NN long long int n;cin >> n;
#define NM long long int n,m;cin >> n >> m;
#define VI(a,n) vector<ll> a(n);
#define MAX 1000000007
#define MIN -1000000007
void dv(vector<ll> g1) { for (auto i = g1.begin(); i != g1.end(); ++i) { cout << *i << " "; } }
int invert(int a) {if (a == 0) {return 1;}else if(a==1){return 0;} else{return -1;}}
ll fact(ll n) { ll res = 1;for (ll i = 2; i <= n; i++) res = res * i%MAX;return res;} 
ll nCr(ll n, ll r){return (fact(n) / (fact(r) * fact(n - r)))%MAX;} 
ll nCr1(ll a,ll b){if(b > a){return 0;}else{ll ans=1;loop(i,b+1,a+1){ans=ans*i%MAX;} return ans;}}

ll func(ll a){if(a%2 == 0){return -1;}else{return 1;}}

int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
////////////////////////////////////////////
	ll n,n1;
	cin >> n;
	n1=n;
	
	loop(i,1,n+1){
		cout << (2*i%n==0?n:2*i%n) << ' ' << ((2*i+1)%n==0?n:(2*i%n+1)) << endl;
		}
	



}
	

Submission Info

Submission Time
Task A - AtCoder Jumper
User a12d
Language C++ (GCC 9.2.1)
Score 500
Code Size 1303 Byte
Status AC
Exec Time 9 ms
Memory 3644 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:31:7: warning: variable ‘n1’ set but not used [-Wunused-but-set-variable]
   31 |  ll n,n1;
      |       ^~

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 9 ms 3644 KB
001.txt AC 5 ms 3520 KB
002.txt AC 5 ms 3584 KB
003.txt AC 4 ms 3528 KB
004.txt AC 3 ms 3592 KB
005.txt AC 5 ms 3592 KB
006.txt AC 2 ms 3520 KB
007.txt AC 2 ms 3516 KB
008.txt AC 2 ms 3600 KB
009.txt AC 5 ms 3516 KB
example0.txt AC 2 ms 3596 KB
example1.txt AC 2 ms 3528 KB