QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#90726#5255. Greedy DrawersValera_GrinenkoWA 2ms3404kbC++142.7kb2023-03-25 00:43:072023-03-25 00:43:08

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-25 00:43:08]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3404kb
  • [2023-03-25 00:43:07]
  • 提交

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());

void solve() {
    int n; cin >> n;
    vector<pair<int, int> > a, b;
    while(n >= 8) {
        n -= 8;
        for(int i = 1; i <= 8; i++) a.emplace_back(i, 9 - i);
        b.emplace_back(3, 8);
        b.emplace_back(4, 8);
        b.emplace_back(4, 8);
        b.emplace_back(5, 5);
        b.emplace_back(8, 4);
        b.emplace_back(8, 4);
        b.emplace_back(8, 3);
        b.emplace_back(8, 3);
    }
    while(n--) {
        a.pb({1000, 1000});
        b.pb({1000, 1000});
    }
    for(auto& x : a) cout << x.fi << ' ' << x.se << '\n';
    cout << '\n';
    for(auto& x : b) cout << x.fi << ' ' << x.se << '\n';
    cout << '\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
 1 8
 2 7
 3 6
 4 5
 5 4
 6 3
 7 2
 8 1

 3 8
 4 8
 4 8
 5 5
 8 4
 8 4
 8 3
 8 3
*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 3404kb

input:

150

output:

1 8
2 7
3 6
4 5
5 4
6 3
7 2
8 1
1 8
2 7
3 6
4 5
5 4
6 3
7 2
8 1
1 8
2 7
3 6
4 5
5 4
6 3
7 2
8 1
1 8
2 7
3 6
4 5
5 4
6 3
7 2
8 1
1 8
2 7
3 6
4 5
5 4
6 3
7 2
8 1
1 8
2 7
3 6
4 5
5 4
6 3
7 2
8 1
1 8
2 7
3 6
4 5
5 4
6 3
7 2
8 1
1 8
2 7
3 6
4 5
5 4
6 3
7 2
8 1
1 8
2 7
3 6
4 5
5 4
6 3
7 2
8 1
1 8
2 7
3 6
...

result:

wrong answer Janko passed your test!