Submission #845579

# Submission time Handle Problem Language Result Execution time Memory
845579 2023-09-06T14:14:56 Z vjudge1 Konstrukcija (COCI20_konstrukcija) C++17
0 / 110
1 ms 344 KB
#include <bits/stdc++.h>
#pragma optimize "DostSeferoğlu"
#pragma GCC optimize("unroll-loops,Ofast")
#pragma GCC target("avx2,tune=native")
using namespace std;
#define int long long
#define pii pair<int,int>
#define bg begin
#define vi vector<int>
#define endl '\n'
#define vvi vector<vi> 
#define pc __builtin_popcountll
#define vp vector<pii>
#define sp << " " << 
#define all(x) x.bg()+1,x.end()
#define ff first
#define ss second
#define brake {cout << "OK\n";return;}
#define debug(x) {cout << #x << ": "; for (auto it : x) cout << it << " ";cout << endl;}
#define FF(xxx,sss,yyy) for (int xxx=sss;xxx<=yyy;++xxx)
#define F(xx,yy) for (int xx=1;xx<=yy;++xx)
#define pb push_back 
const int inf = 1e18;
const int MOD = 1e9+7;   
const int N = 2e5+1;
const int A = 2131924;
const int B = 3215515;
const int C = 1631662;
int add(int x,int y) {
    return ((x%MOD)+(y%MOD))%MOD;
}
int mult(int x,int y) {
    return ((x%MOD)*(y%MOD))%MOD;
}
int hsha(string& s,int l,int r) {
    int ret = 0;
    for (int k=l;k<=r;k++) {
        ret = add(mult(ret,A),s[k-1]);
    }
    return ret;
}
int hshb(string& s,int l,int r) {
    int ret = 0;
    for (int k=l;k<=r;k++) {
        ret = add(mult(ret,B),s[k-1]);
    }
    return ret;
}
int hshc(string& s,int l,int r) {
    int ret = 0;
    for (int k=l;k<=r;k++) {
        ret = add(mult(ret,C),s[k-1]);
    }
    return ret;
}
void solve() {
    int k;
    cin >> k;
    if (k<500) {
        cout << k+2 sp 2*k << endl;
        for (int i=2;i<=k+1;i++) {
            cout << 1 sp i << endl;
        }
        for (int i=2;i<=k+1;i++) {
            cout << i sp k+2 << endl;
        }
        return;
    }
}    



signed main() { 
    ios_base::sync_with_stdio(0);cin.tie(0);
    #ifdef Local
        freopen("input.in", "r", stdin);
        freopen("input.out", "w", stdout);  
    #endif
    int t = 1;
    //cin >> t;
    while (t --> 0) solve();
}

Compilation message

konstrukcija.cpp:2: warning: ignoring '#pragma optimize ' [-Wunknown-pragmas]
    2 | #pragma optimize "DostSeferoğlu"
      |
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Wrong answer.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Integer parameter [name=N] equals to -34, violates the range [1, 1000]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Wrong answer.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Wrong answer.
2 Halted 0 ms 0 KB -