Submission #19960945


Source Code Expand

#include<bits/stdc++.h>
#include<atcoder/all>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define ALL(x) (x).begin(), (x).end()
#define REP(i ,n) for(int i = 0; i < (int)(n); i++)
#define pb push_back
#define mp make_pair
typedef vector<int>vint;
typedef vector<ll>vll;
template<typename T> istream &operator>>(istream &is, vector<T> &vec){ for (auto &v : vec) is >> v; return is; }
template<typename A,typename B>inline bool chmin(A &a,const B &b){if(a>b){a=b;return true;}else{return false;}}
template<typename A,typename B>inline bool chmax(A &a,const B &b){if(a<b){a=b;return true;}else{return false;}}

int main(){
    int N,X;
    cin >> N >> X;
    vint A(N);
    vint ans;
    cin >> A;
    for(auto a:A){
        if(a == X)continue;
        ans.pb(a);
    }
    for(auto a:ans)cout << a << " ";
    cout << endl;
}

Submission Info

Submission Time
Task B - Remove It
User kiuyuki
Language C++ (GCC 9.2.1)
Score 200
Code Size 884 Byte
Status AC
Exec Time 50 ms
Memory 4344 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 14
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All handmade_00.txt, handmade_01.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
handmade_00.txt AC 8 ms 3524 KiB
handmade_01.txt AC 2 ms 3652 KiB
random_00.txt AC 49 ms 3548 KiB
random_01.txt AC 50 ms 4344 KiB
random_02.txt AC 48 ms 4096 KiB
random_03.txt AC 48 ms 4240 KiB
random_04.txt AC 50 ms 4096 KiB
random_05.txt AC 13 ms 3764 KiB
random_06.txt AC 37 ms 3628 KiB
random_07.txt AC 10 ms 3640 KiB
random_08.txt AC 28 ms 3700 KiB
random_09.txt AC 38 ms 4004 KiB
sample_01.txt AC 7 ms 3632 KiB
sample_02.txt AC 2 ms 3656 KiB