Submission #17629148
Source Code Expand
Copy
#include <bits/stdc++.h>using namespace std;#define oo 1e18#define fi first#define se second#define sp(iiii) setprecision(iiii)#define IO ios_base::sync_with_stdio(false); cin.tie(0)#define ms(aaaa,xxxx) memset(aaaa,xxxx,sizeof(aaaa))#define cntbit(xxxx) __builtin_popcount(xxxx)#define getbit(xxxx,aaaa) ((xxxx>>(aaaa-1))&1)typedef long double ld;typedef long long ll;typedef unsigned long long ull;typedef pair<int,int> pii;typedef pair<pair<int,int>,int> piii;typedef pair<long long,long long> pll;typedef pair<pair<long long,long long>,long long> plll;const ll mod=1e9+7;
#include <bits/stdc++.h> using namespace std; #define oo 1e18 #define fi first #define se second #define sp(iiii) setprecision(iiii) #define IO ios_base::sync_with_stdio(false); cin.tie(0) #define ms(aaaa,xxxx) memset(aaaa,xxxx,sizeof(aaaa)) #define cntbit(xxxx) __builtin_popcount(xxxx) #define getbit(xxxx,aaaa) ((xxxx>>(aaaa-1))&1) typedef long double ld; typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> pii; typedef pair<pair<int,int>,int> piii; typedef pair<long long,long long> pll; typedef pair<pair<long long,long long>,long long> plll; const ll mod=1e9+7; ll n,m,i,k; int main(){ IO; #ifndef ONLINE_JUDGE freopen("test.inp", "r", stdin); freopen("test.out", "w", stdout); #else #endif cin>>n>>m; k=n-(m*2); if (abs(k)==n) { cout<<-1; return 0; } if (k>0) { cout<<1<<' '<<k+k+1<<'\n'; for (i=2;i<=k;i++) { cout<<i<<' '<<i+1<<'\n'; } for (i=k+1;i<=n;i++) { cout<<k+k+k+i+1<<' '<<k+k+k+i+2<<'\n'; } } else { k*=-1; cout<<k+1<<' '<<k+2<<'\n'; for (i=2;i<=k;i++) { cout<<i<<' '<<i+k+k+4<<'\n'; } for (i=k+1;i<=n;i++) { cout<<i+10000000<<' '<<i+10000000<<'\n'; } } }
Submission Info
Submission Time | |
---|---|
Task | C - Solutions |
User | Fidisk |
Language | C++ (GCC 9.2.1) |
Score | 0 |
Code Size | 1374 Byte |
Status | WA |
Exec Time | 91 ms |
Memory | 8652 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 500 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00-Sample-00, 00-Sample-01 |
All | 00-Sample-00, 00-Sample-01, 01-N103497M97981, 01-N10M-1, 01-N10M-10, 01-N10M-2, 01-N10M-3, 01-N10M-4, 01-N10M-5, 01-N10M-6, 01-N10M-7, 01-N10M-8, 01-N10M-9, 01-N10M0, 01-N10M1, 01-N10M10, 01-N10M2, 01-N10M3, 01-N10M4, 01-N10M5, 01-N10M6, 01-N10M7, 01-N10M8, 01-N10M9, 01-N11431M1531, 01-N123857M109412, 01-N133447M71060, 01-N139679M46985, 01-N161868M156803, 01-N163982M79925, 01-N168417M143637, 01-N1M0, 01-N200000M-1, 01-N200000M-100000, 01-N200000M-200000, 01-N200000M0, 01-N200000M1, 01-N200000M100000, 01-N200000M199998, 01-N200000M199999, 01-N200000M2, 01-N200000M200000, 01-N23355M10651, 01-N24593M15890, 01-N31932M26393, 01-N36426M9434, 01-N36991M31877, 01-N48772M22606, 01-N60522M40319, 01-N63340M21398, 01-N7775M948, 01-N86918M73878, 01-N87940M11203, 01-N95728M66299 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00-Sample-00 | WA | 5 ms | 3600 KB |
00-Sample-01 | WA | 2 ms | 3512 KB |
01-N103497M97981 | WA | 27 ms | 3564 KB |
01-N10M-1 | WA | 8 ms | 3480 KB |
01-N10M-10 | WA | 3 ms | 3512 KB |
01-N10M-2 | WA | 2 ms | 3580 KB |
01-N10M-3 | WA | 2 ms | 3468 KB |
01-N10M-4 | WA | 2 ms | 3576 KB |
01-N10M-5 | WA | 2 ms | 3604 KB |
01-N10M-6 | WA | 2 ms | 3544 KB |
01-N10M-7 | WA | 2 ms | 3524 KB |
01-N10M-8 | WA | 2 ms | 3472 KB |
01-N10M-9 | WA | 3 ms | 3520 KB |
01-N10M0 | WA | 2 ms | 3528 KB |
01-N10M1 | WA | 2 ms | 3472 KB |
01-N10M10 | AC | 2 ms | 3540 KB |
01-N10M2 | WA | 2 ms | 3468 KB |
01-N10M3 | WA | 2 ms | 3576 KB |
01-N10M4 | WA | 2 ms | 3524 KB |
01-N10M5 | WA | 2 ms | 3604 KB |
01-N10M6 | WA | 2 ms | 3540 KB |
01-N10M7 | WA | 2 ms | 3532 KB |
01-N10M8 | WA | 2 ms | 3536 KB |
01-N10M9 | WA | 2 ms | 3600 KB |
01-N11431M1531 | WA | 5 ms | 3532 KB |
01-N123857M109412 | WA | 30 ms | 3604 KB |
01-N133447M71060 | WA | 29 ms | 3536 KB |
01-N139679M46985 | WA | 30 ms | 3476 KB |
01-N161868M156803 | WA | 33 ms | 3540 KB |
01-N163982M79925 | WA | 33 ms | 3568 KB |
01-N168417M143637 | WA | 31 ms | 3584 KB |
01-N1M0 | WA | 5 ms | 3576 KB |
01-N200000M-1 | WA | 35 ms | 3636 KB |
01-N200000M-100000 | WA | 65 ms | 5836 KB |
01-N200000M-200000 | WA | 91 ms | 8652 KB |
01-N200000M0 | WA | 4 ms | 3576 KB |
01-N200000M1 | WA | 38 ms | 3584 KB |
01-N200000M100000 | WA | 41 ms | 3968 KB |
01-N200000M199998 | WA | 37 ms | 3540 KB |
01-N200000M199999 | WA | 35 ms | 3564 KB |
01-N200000M2 | WA | 37 ms | 3600 KB |
01-N200000M200000 | AC | 7 ms | 3648 KB |
01-N23355M10651 | WA | 11 ms | 3540 KB |
01-N24593M15890 | WA | 10 ms | 3528 KB |
01-N31932M26393 | WA | 12 ms | 3652 KB |
01-N36426M9434 | WA | 12 ms | 3540 KB |
01-N36991M31877 | WA | 15 ms | 3628 KB |
01-N48772M22606 | WA | 12 ms | 3524 KB |
01-N60522M40319 | WA | 18 ms | 3612 KB |
01-N63340M21398 | WA | 15 ms | 3612 KB |
01-N7775M948 | WA | 10 ms | 3612 KB |
01-N86918M73878 | WA | 20 ms | 3544 KB |
01-N87940M11203 | WA | 24 ms | 3584 KB |
01-N95728M66299 | WA | 19 ms | 3540 KB |