제출 #1358313

#제출 시각아이디문제언어결과실행 시간메모리
1358313blopSob (COCI19_sob)C++20
0 / 110
1 ms348 KiB
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

template<class T>
using ordered_set = tree<T, null_type, less<T>, 
					rb_tree_tag, tree_order_statistics_node_update>;
template<class T, class U>
using ordered_map = tree<T, U, less<T>, rb_tree_tag,
					tree_order_statistics_node_update>;
#define ll long long
#define ld long double
#define MOD 998244353
#define MAXN 250000
#define SIZE 100
#define pb push_back

ll power(ll a, ll b){
	if (b == 0) return 1;
	ll res = power(a, b / 2);
//	if (b % 2 == 1) return res * res % MOD * a % MOD;
//	return res * res % MOD;
	
	if (b % 2 == 1) return res * res * a;
	return res * res;
}

signed main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	
	int n, m;
	cin >> n >> m;
	vector<int> a(n), b(n);
	for (int i = 0; i < n; i++){
		a[i] = i;
		b[i] = i;
	}
	for (int i = 0; i < m; i++){
		//b[i % n] ilang
		//b[i % n] diganti ama b[0]
		//b[0] diganti ama m+i
		b[i % n] = b[0];
		b[0] = n+i;
//		for (int i = 0; i < n; i++){
//			cout << a[i] << " " << b[i] << "\n";
//		}
//		cout << "\n\n";
	}
	for (int i = 0; i < n; i++){
		cout << a[i] << " " << b[i] << "\n";
	}
	
	return 0;
}
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…