Submission #66166747
Source Code Expand
#include<bits/stdc++.h>
using namespace std;
// #define int long long
#define rep(i,j,k) for(int i=(j);i<=(k);i++)
#define per(i,j,k) for(int i=(j);i>=(k);i--)
#define pb emplace_back
#define fi first
#define se second
using vi=vector<int>;
using pi=pair<int,int>;
template<typename T0, typename T1> bool chmin(T0 &x,const T1 &y){
if(y<x){x=y; return true;} return false;
}
template<typename T0, typename T1> bool chmax(T0 &x,const T1 &y){
if(y>x){x=y; return true;} return false;
}
namespace Debug{
template<typename T> void _debug(char *s, T x){
cerr<< s <<" = "<< x <<endl;
}
template<typename T, typename ...Ar> void _debug(char *s, T x, Ar... y){
while(*s != ',') cerr<< *s++;
cerr<< " = "<< x <<",";
_debug(s+1, y...);
}
}
using namespace Debug;
#define gdb(...) _debug((char*)#__VA_ARGS__, __VA_ARGS__)
signed main(){
#ifdef LOCAL
freopen(".in","r",stdin);
freopen(".out","w",stdout);
#endif
ios::sync_with_stdio(0);cin.tie(0);
int n;
cin >> n;
auto output = [&](vi S){
cout << S.size() <<'\n';
for(int x:S){
cout << x <<' ';
}
cout <<'\n';
};
if(n == 1){
output(vi{1});
}
else{
vi ans;
rep(i, 1, n / 2){
ans.pb(i * 2);
}
output(ans);
}
}
Submission Info
| Submission Time |
|
| Task |
A - I hate 1 |
| User |
bananabot |
| Language |
C++ 23 (Clang 16.0.6) |
| Score |
300 |
| Code Size |
1262 Byte |
| Status |
AC |
| Exec Time |
6 ms |
| Memory |
4168 KiB |
Judge Result
| Set Name |
Sample |
All |
| Score / Max Score |
0 / 0 |
300 / 300 |
| Status |
|
|
| Set Name |
Test Cases |
| Sample |
example_00.txt, example_01.txt |
| All |
example_00.txt, example_01.txt, test_00.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt |
| Case Name |
Status |
Exec Time |
Memory |
| example_00.txt |
AC |
1 ms |
3384 KiB |
| example_01.txt |
AC |
1 ms |
3376 KiB |
| test_00.txt |
AC |
1 ms |
3288 KiB |
| test_01.txt |
AC |
1 ms |
3360 KiB |
| test_02.txt |
AC |
1 ms |
3464 KiB |
| test_03.txt |
AC |
1 ms |
3512 KiB |
| test_04.txt |
AC |
1 ms |
3460 KiB |
| test_05.txt |
AC |
1 ms |
3508 KiB |
| test_06.txt |
AC |
1 ms |
3380 KiB |
| test_07.txt |
AC |
1 ms |
3464 KiB |
| test_08.txt |
AC |
5 ms |
3856 KiB |
| test_09.txt |
AC |
1 ms |
3392 KiB |
| test_10.txt |
AC |
5 ms |
3708 KiB |
| test_11.txt |
AC |
4 ms |
3488 KiB |
| test_12.txt |
AC |
4 ms |
3872 KiB |
| test_13.txt |
AC |
5 ms |
3908 KiB |
| test_14.txt |
AC |
5 ms |
3968 KiB |
| test_15.txt |
AC |
5 ms |
4116 KiB |
| test_16.txt |
AC |
6 ms |
4112 KiB |
| test_17.txt |
AC |
5 ms |
3972 KiB |
| test_18.txt |
AC |
5 ms |
4168 KiB |
| test_19.txt |
AC |
6 ms |
4112 KiB |