QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#464757#8041. Life is Hard and Undecidable, but...lonlynessWA 1ms3600kbC++23831b2024-07-06 14:38:342024-07-06 14:38:35

Judging History

This is the latest submission verdict.

  • [2024-07-06 14:38:35]
  • Judged
  • Verdict: WA
  • Time: 1ms
  • Memory: 3600kb
  • [2024-07-06 14:38:34]
  • Submitted

answer

#include<iostream>
#include<algorithm>
#include<cstring>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<cmath>
using namespace std;
#define int long long 
#define endl "\n"
const int N = 9e5+10;
int n,m,k;
typedef pair<int,int> PII;
vector<int>g[N];

void solve()
{
    cin>>n;
    cout<<n*2<<endl;;
    int x= 1,y = 1;
    for(int i = 0;i < n;i ++)
    {
        if(i%2==0){
            cout<<x<<' '<<y<<endl;
            cout<<x+1<<' '<<y<<endl;
            x+=2,y++;
        }
        else {
            cout<<x<<' '<<y<<endl;
             cout<<x<<' '<<y+1<<endl;
            x++,y+=2;
        }
    }
}
signed  main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0);
   int t=1;
//   cin>>t;
   while(t--)
   {
       solve();
   }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3600kb

input:

1

output:

2
1 1
2 1

result:

ok n=2

Test #2:

score: 0
Accepted
time: 1ms
memory: 3580kb

input:

2

output:

4
1 1
2 1
3 2
3 3

result:

ok n=4

Test #3:

score: -100
Wrong Answer
time: 1ms
memory: 3556kb

input:

3

output:

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

result:

wrong answer Alive at generation 3