結果

問題 No.1537 私の代わりに仕事やっといてください。
ユーザー pepper_aobutapepper_aobuta
提出日時 2021-06-06 00:43:12
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,712 bytes
コンパイル時間 955 ms
コンパイル使用メモリ 106,568 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-05 01:20:17
合計ジャッジ時間 3,098 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <random>
using namespace std;
using ll = long long;


int main(){
    int n;
    cin >> n;
    cout << n << endl;
    vector<ll> a(n);
    for(int i = 0 ; i < n ; i++)cin >> a[i];
    cout << 1 << endl;
    
    sort(a.begin(),a.end());
    for(int i = 0 ; i < n - 1 ; i++){
        if(a[i] == a[i + 1]){
            cout << 1;
            return 0;
        }
    }
    cout << 2 << endl;
    return 0;
}
0