답안 #478483

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
478483 2021-10-07T17:13:46 Z inksamurai Konstrukcija (COCI20_konstrukcija) C++17
15 / 110
1 ms 972 KB
#include <bits/stdc++.h>
//eolibraries
#define lnf 3999999999999999999
#define inf 999999999
#define fi first
#define se second
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define sz(c) (int)(c).size()
#define make_unique(a) sort(all(a)),a.erase(unique(all(a)),a.end());
#define rep(i,n) for(int i=0;i<n;i++)
#define drep(i,n) for(int i=n-1;i>=0;i--)
#define crep(i,x,n) for(int i=x;i<n;i++)
#define vec(...) vector<__VA_ARGS__>
#define _3ioVv0Q ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
//eodefine
using namespace std;
typedef long long ll;
typedef long double ld;
using pii=pair<int,int>;
using vi=vec(int);
const int mxn=12000;

vi adj[mxn];

int main(){
_3ioVv0Q;
	ll k;
	cin>>k;
	k=k+1;
	assert(k>0 and k<=500);
	vec(vi) adj(k+2);
	crep(i,1,k+1){
		adj[0].pb(i);
		adj[i].pb(k+1);
	}
	int m=0;
	rep(i,k+2){
		m+=sz(adj[i]);
	}
	cout<<k+2<<" "<<m<<"\n";
	rep(i,k+2){
		for(auto u : adj[i]){
			cout<<i+1<<" "<<u+1<<"\n";
		}
	}
//	
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 588 KB Correct.
2 Correct 1 ms 588 KB Correct.
3 Correct 1 ms 588 KB Correct.
4 Correct 1 ms 588 KB Correct.
5 Correct 1 ms 588 KB Correct.
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 972 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 588 KB Correct.
2 Correct 1 ms 588 KB Correct.
3 Correct 1 ms 588 KB Correct.
4 Correct 1 ms 588 KB Correct.
5 Correct 1 ms 588 KB Correct.
6 Runtime error 1 ms 972 KB Execution killed with signal 6
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 588 KB Correct.
2 Correct 1 ms 588 KB Correct.
3 Correct 1 ms 588 KB Correct.
4 Correct 1 ms 588 KB Correct.
5 Correct 1 ms 588 KB Correct.
6 Runtime error 1 ms 972 KB Execution killed with signal 6
7 Halted 0 ms 0 KB -