| Task: | Lantern Line |
| Sender: | dsedov |
| Submission time: | 2018-09-13 17:52:02 +0300 |
| Language: | C++ |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | ACCEPTED | 0.01 s | details |
| #2 | ACCEPTED | 0.02 s | details |
| #3 | WRONG ANSWER | 0.02 s | details |
| #4 | WRONG ANSWER | 0.03 s | details |
| #5 | WRONG ANSWER | 0.04 s | details |
| #6 | WRONG ANSWER | 0.06 s | details |
| #7 | WRONG ANSWER | 0.05 s | details |
| #8 | WRONG ANSWER | 0.05 s | details |
| #9 | WRONG ANSWER | 0.05 s | details |
| #10 | WRONG ANSWER | 0.04 s | details |
| #11 | WRONG ANSWER | 0.05 s | details |
| #12 | WRONG ANSWER | 0.06 s | details |
| #13 | WRONG ANSWER | 0.06 s | details |
| #14 | WRONG ANSWER | 0.06 s | details |
| #15 | WRONG ANSWER | 0.06 s | details |
Code
#include <stdio.h>
#include <iostream>
#include <memory.h>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
#define sqr(a) ((a) * (a))
#define pi 3.1415926535897932384626433832795
#define TASK "c"
int n;
void Load()
{
cin >> n;
//cerr << (-4)%4 << endl;
}
void Solve()
{
int ans;
for(int i = 0; i < n; i++)
{
ans = 1;
if(i%2 && i+1 < n) ans++;
if(((i-2)%4 == 0 || (i-3)%4 == 0) && i+2 < n) ans++;
cout << ans << " ";
}
}
int main()
{
//freopen(TASK".in", "r", stdin);
//freopen(TASK".out", "w", stdout);
Load();
Solve();
return 0;
}Test details
Test 1
Verdict: ACCEPTED
| input |
|---|
| 6 |
| correct output |
|---|
| 1 2 2 3 1 1 |
| user output |
|---|
| 1 2 2 3 1 1 |
Test 2
Verdict: ACCEPTED
| input |
|---|
| 1 |
| correct output |
|---|
| 1 |
| user output |
|---|
| 1 |
Test 3
Verdict: WRONG ANSWER
| input |
|---|
| 50000 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
Test 4
Verdict: WRONG ANSWER
| input |
|---|
| 100000 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
Test 5
Verdict: WRONG ANSWER
| input |
|---|
| 200000 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
Test 6
Verdict: WRONG ANSWER
| input |
|---|
| 300000 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
Test 7
Verdict: WRONG ANSWER
| input |
|---|
| 400000 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
Test 8
Verdict: WRONG ANSWER
| input |
|---|
| 345283 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
Test 9
Verdict: WRONG ANSWER
| input |
|---|
| 283161 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
Test 10
Verdict: WRONG ANSWER
| input |
|---|
| 269247 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
Test 11
Verdict: WRONG ANSWER
| input |
|---|
| 392224 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
Test 12
Verdict: WRONG ANSWER
| input |
|---|
| 398314 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
Test 13
Verdict: WRONG ANSWER
| input |
|---|
| 397155 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
Test 14
Verdict: WRONG ANSWER
| input |
|---|
| 393692 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
Test 15
Verdict: WRONG ANSWER
| input |
|---|
| 398499 |
| correct output |
|---|
| 1 2 2 4 2 4 4 8 2 4 4 8 4 8 8 ... |
| user output |
|---|
| 1 2 2 3 1 2 2 3 1 2 2 3 1 2 2 ... Truncated |
