Submission #547449

# Submission time Handle Problem Language Result Execution time Memory
547449 2022-04-10T17:58:14 Z vjudge1 Cigle (COI21_cigle) C++14
0 / 100
1 ms 212 KB
#include<stdio.h>
int main()
{
	int tc;
    scanf("%d",&tc) ;
    while(tc--)
    {
		int N;
        scanf("%d",&N);
        if (N == 1) 
  		{
            printf("1\n1 1\n") ;
            continue;
        }
        printf("%d\n",N/2) ;
        if (N%2 != 0) 
            printf("3 1 2 %d\n",N) ;
		else 
            printf("2 1 2\n");
        for (int i=4; i<=N; i+=2)
            printf("2 %d %d\n",i-1,i);
    }
    return 0 ;
}

Compilation message

cigle.cpp: In function 'int main()':
cigle.cpp:5:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    5 |     scanf("%d",&tc) ;
      |     ~~~~~^~~~~~~~~~
cigle.cpp:9:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |         scanf("%d",&N);
      |         ~~~~~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -