답안 #576445

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
576445 2022-06-13T06:15:17 Z temporary_juggernaut Newspapers (CEOI21_newspapers) C++14
6 / 100
1 ms 212 KB
#include<bits/stdc++.h>
#define fr first
#define sc second
using namespace std;
typedef long long ll;
typedef long double ld;
#define USING_ORDERED_SET 0
#if USING_ORDERED_SET
#include<bits/extc++.h>
using namespace __gnu_pbds;
template<class T>using ordered_set=tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
#endif
template<class T>void umax(T &a,T b){if(a<b)a=b;}
template<class T>void umin(T &a,T b){if(b<a)a=b;}
#ifdef juggernaut
    #define printl(args...)printf(args)
#else
    #define printl(args...)((void)0)
#endif
int main(){
	int n;
	cin>>n;
	if(n==1){
		puts("YES\n1\n1");
		return 0;
	}else if(n==2||n==3){
		puts("YES\n2\n2 2");
		return 0;
	}
	vector<int>vec;
	for(int i=1;i<=n;i++)vec.push_back(i);
	if((vec.back()&1)==0)vec.pop_back();
	if((int)vec.back()&1)vec.push_back(1);
	for(int i=2;i<=n;i++)vec.push_back(i);
	if(vec.back()&1)vec.pop_back();
	printf("YES\n%d\n",int(vec.size()));
	for(int to:vec)printf("%d ",to);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
4 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
5 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
6 Partially correct 0 ms 212 KB Failed to provide a successful strategy.
7 Incorrect 0 ms 212 KB Output isn't correct
8 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
5 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
6 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
7 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
8 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
9 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
10 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
11 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
12 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
13 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
14 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
15 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
16 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
17 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
18 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
19 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
20 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
4 Partially correct 1 ms 212 KB Provide a successful but not optimal strategy.
5 Partially correct 0 ms 212 KB Provide a successful but not optimal strategy.
6 Partially correct 0 ms 212 KB Failed to provide a successful strategy.
7 Incorrect 0 ms 212 KB Output isn't correct
8 Halted 0 ms 0 KB -