Submission #62513819
Source Code Expand
Copy
#pragma GCC optimize("Ofast","inline","unroll-loops","no-stack-protector")#include <bits/stdc++.h>#define MountainRain main// #define int long long// #define double long double#define INF 0x3f3f3f3f#define endl '\n'#define fi first#define se secondusing namespace std;typedef pair<int,int> PII;typedef pair<double,double> PDD;typedef long long LL;typedef unsigned long long ULL;int in(){int x=0,y=0;char c=0;while(!isdigit(c))y|=c=='-',c=getchar();while(isdigit(c))x=(x<<3)+(x<<1)+(c^48),c=getchar();return y?-x:x;}void out(int x){if(x<0)putchar('-'),x=-x;if(x>9)out(x/10);putchar(x%10+'0');}const int N=1010;int a[N];bool present[N];vector<int> no;int n,m;void solve(){cin>>n>>m;for(int i=1;i<=m;++i)cin>>a[i];for(int i=1;i<=m;++i)present[a[i]]=true;for(int i=1;i<=n;++i)
#pragma GCC optimize("Ofast","inline","unroll-loops","no-stack-protector") #include <bits/stdc++.h> #define MountainRain main // #define int long long // #define double long double #define INF 0x3f3f3f3f #define endl '\n' #define fi first #define se second using namespace std;typedef pair<int,int> PII;typedef pair<double,double> PDD;typedef long long LL;typedef unsigned long long ULL;int in(){int x=0,y=0;char c=0;while(!isdigit(c))y|=c=='-',c=getchar();while(isdigit(c))x=(x<<3)+(x<<1)+(c^48),c=getchar();return y?-x:x;}void out(int x){if(x<0)putchar('-'),x=-x;if(x>9)out(x/10);putchar(x%10+'0');} const int N=1010; int a[N]; bool present[N]; vector<int> no; int n,m; void solve() { cin>>n>>m; for(int i=1;i<=m;++i)cin>>a[i]; for(int i=1;i<=m;++i)present[a[i]]=true; for(int i=1;i<=n;++i) if(!present[i])no.push_back(i); cout<<no.size()<<endl; for(int i=0;i<no.size();++i) cout<<no[i]<<' '; } signed MountainRain() { ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); cout.setf(ios::fixed),cout.precision(2); int T=1;//cin>>T; while(T--)solve(); return 0; } /******************************* | Author: MountainRain | Problem: B - Who is Missing? | Contest: AtCoder - Japan Registry Services (JPRS) Programming Contest 2025#1 (AtCoder Beginner Contest 392) | URL: https://atcoder.jp/contests/abc392/tasks/abc392_b | When: 2025-02-08 20:02:49 | Memory: 1024 MB | Time: 2000 ms *******************************/
Submission Info
Submission Time | |
---|---|
Task | B - Who is Missing? |
User | MountainRain |
Language | C++ 17 (gcc 12.2) |
Score | 200 |
Code Size | 1475 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3644 KiB |
Compile Error
Main.cpp: In function ‘void solve()’: Main.cpp:24:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 24 | for(int i=0;i<no.size();++i) | ~^~~~~~~~~~
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | sample_01.txt, sample_02.txt, sample_03.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, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt, test_31.txt, test_32.txt, test_33.txt, test_34.txt, test_35.txt, test_36.txt, test_37.txt, test_38.txt, test_39.txt, test_40.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 1 ms | 3428 KiB |
sample_02.txt | AC | 1 ms | 3392 KiB |
sample_03.txt | AC | 1 ms | 3608 KiB |
test_01.txt | AC | 1 ms | 3524 KiB |
test_02.txt | AC | 1 ms | 3516 KiB |
test_03.txt | AC | 1 ms | 3448 KiB |
test_04.txt | AC | 1 ms | 3524 KiB |
test_05.txt | AC | 1 ms | 3464 KiB |
test_06.txt | AC | 1 ms | 3428 KiB |
test_07.txt | AC | 1 ms | 3488 KiB |
test_08.txt | AC | 1 ms | 3420 KiB |
test_09.txt | AC | 1 ms | 3516 KiB |
test_10.txt | AC | 1 ms | 3488 KiB |
test_11.txt | AC | 1 ms | 3396 KiB |
test_12.txt | AC | 1 ms | 3420 KiB |
test_13.txt | AC | 1 ms | 3540 KiB |
test_14.txt | AC | 1 ms | 3540 KiB |
test_15.txt | AC | 1 ms | 3424 KiB |
test_16.txt | AC | 1 ms | 3520 KiB |
test_17.txt | AC | 1 ms | 3436 KiB |
test_18.txt | AC | 1 ms | 3412 KiB |
test_19.txt | AC | 1 ms | 3644 KiB |
test_20.txt | AC | 1 ms | 3488 KiB |
test_21.txt | AC | 1 ms | 3448 KiB |
test_22.txt | AC | 1 ms | 3536 KiB |
test_23.txt | AC | 1 ms | 3520 KiB |
test_24.txt | AC | 1 ms | 3440 KiB |
test_25.txt | AC | 1 ms | 3424 KiB |
test_26.txt | AC | 1 ms | 3464 KiB |
test_27.txt | AC | 1 ms | 3372 KiB |
test_28.txt | AC | 1 ms | 3532 KiB |
test_29.txt | AC | 1 ms | 3440 KiB |
test_30.txt | AC | 1 ms | 3524 KiB |
test_31.txt | AC | 1 ms | 3584 KiB |
test_32.txt | AC | 1 ms | 3412 KiB |
test_33.txt | AC | 1 ms | 3612 KiB |
test_34.txt | AC | 1 ms | 3540 KiB |
test_35.txt | AC | 1 ms | 3488 KiB |
test_36.txt | AC | 1 ms | 3520 KiB |
test_37.txt | AC | 1 ms | 3536 KiB |
test_38.txt | AC | 1 ms | 3496 KiB |
test_39.txt | AC | 1 ms | 3540 KiB |
test_40.txt | AC | 1 ms | 3540 KiB |