QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#418925#8041. Life is Hard and Undecidable, but..._mjj#WA 0ms3536kbC++20748b2024-05-23 16:29:162024-05-23 16:29:16

Judging History

This is the latest submission verdict.

  • [2024-05-23 16:29:16]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3536kb
  • [2024-05-23 16:29:16]
  • Submitted

answer

#include <bits/stdc++.h>
#define x first
#define y second
#define all(v) v.begin() , v.end()
#define ios ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#define int long long

using namespace std;

typedef long long LL;
typedef pair<int , int> PII;

const int N = 3e5 + 5;
const int mod = 998244353;
const int INF = 0x3f3f3f3f;


void solve()
{
    int k;
    cin>>k;
    vector<PII> ans;
    for(int i=2;i<=k+1;i++) ans.push_back({i,1});
    for(int i=2;i<=k+1;i++) ans.push_back({1,i});
    cout<<ans.size()<<endl;
    for(auto it:ans) cout<<it.x<<" "<<it.y<<endl;
}

signed main(){
    ios;
    int T = 1;
    //cin >> T;
    while(T --){
        solve();
    }
    return 0;
}

/*
2
SPR
SPSRRP
*/

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3536kb

input:

1

output:

2
2 1
1 2

result:

ok n=2

Test #2:

score: 0
Accepted
time: 0ms
memory: 3464kb

input:

2

output:

4
2 1
3 1
1 2
1 3

result:

ok n=4

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3536kb

input:

3

output:

6
2 1
3 1
4 1
1 2
1 3
1 4

result:

wrong answer Alive at generation 3