QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#90747 | #5255. Greedy Drawers | Valera_Grinenko | WA | 2ms | 3472kb | C++14 | 2.9kb | 2023-03-25 03:39:12 | 2023-03-25 03:39:16 |
Judging History
answer
//#pragma GCC optimize("Ofast", "unroll-loops")
//#pragma GCC target("sse", "sse2", "sse3", "ssse3", "sse4")
#ifdef __APPLE__
#include <iostream>
#include <cmath>
#include <algorithm>
#include <cstdio>
#include <cstdint>
#include <cstring>
#include <string>
#include <cstdlib>
#include <vector>
#include <bitset>
#include <map>
#include <queue>
#include <ctime>
#include <stack>
#include <set>
#include <list>
#include <random>
#include <deque>
#include <functional>
#include <iomanip>
#include <sstream>
#include <fstream>
#include <complex>
#include <numeric>
#include <immintrin.h>
#include <cassert>
#include <array>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <thread>
#else
#include <bits/stdc++.h>
#endif
#define all(a) a.begin(),a.end()
#define len(a) (int)(a.size())
#define mp make_pair
#define pb push_back
#define fir first
#define sec second
#define fi first
#define se second
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef long double ld;
template<typename T>
bool umin(T &a, T b) {
if (b < a) {
a = b;
return true;
}
return false;
}
template<typename T>
bool umax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
#if __APPLE__
#define D for (bool _FLAG = true; _FLAG; _FLAG = false)
#define LOG(...) print(#__VA_ARGS__" ::", __VA_ARGS__) << endl
template<class ...Ts>
auto &print(Ts ...ts) { return ((cerr << ts << " "), ...); }
#else
#define D while (false)
#define LOG(...)
#endif
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int x[6] = {3, 3, 3, 6, 6, 6};
int y[6] = {0, 0, 0, 2, 3, 3};
void solve() {
int n; cin >> n;
vector<pair<int, int> > a, b;
for(int i = 1; i <= n; i++) a.pb({i, 696 - i + 1});
int kek = 0;
while(kek + 6 <= n) {
for(int i = 0; i < 6; i++) b.pb({kek + x[i], 696 - (kek + y[i])});
kek += 6;
}
for(int i = kek + 1; i <= n; i++) b.pb({n, 696 - (kek + 1)});
for(auto& X : a) cout << X.fi << ' ' << X.se << '\n';
cout << '\n';
for(auto& X : b) cout << X.fi << ' ' << X.se << '\n';
cout << '\n';
// for(int i = 1; i <= n; i++) cout << i << ' ' << 696 - i << '\n';
// cout << '\n';
// int kek = 0;
// while(kek + 8 <= n) {
// for(int i = 0; i < 8; i++) {
// cout << 696 - (kek + x[i]) << ' ' << kek + y[i] << '\n';
// }
// kek += 8;
// }
// for (int i = kek + 1; i <= n; i++) {
// cout << n << ' ' << 696 - (kek + 1) << '\n';
// }
}
signed main() {
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int t = 1;
//cin >> t;
while (t--) solve();
}
/*
KIVI
*/
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 2ms
memory: 3472kb
input:
150
output:
1 696 2 695 3 694 4 693 5 692 6 691 7 690 8 689 9 688 10 687 11 686 12 685 13 684 14 683 15 682 16 681 17 680 18 679 19 678 20 677 21 676 22 675 23 674 24 673 25 672 26 671 27 670 28 669 29 668 30 667 31 666 32 665 33 664 34 663 35 662 36 661 37 660 38 659 39 658 40 657 41 656 42 655 43 654 44 653 4...
result:
wrong answer Janko passed your test!