結果

問題 No.112 ややこしい鶴亀算
ユーザー ikdikd
提出日時 2015-11-01 17:48:50
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 464 bytes
コンパイル時間 754 ms
コンパイル使用メモリ 64,592 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-13 06:53:02
合計ジャッジ時間 1,509 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>

using namespace std;

int main(){

    int n;
    cin>> n;

    vector<int> asi(n);
    for(int i=0; i<n; i++){
        cin>> asi[i];
    }

    sort(asi.begin(), asi.end());\

    int cnt_k=0, cnt_t=0;
    for(int i=0; i<n; i++){
        if(asi[i] == (n-1)*2){
            cnt_t++;
        }else{
            cnt_k++;
        }
    }

    printf("%d %d\n", cnt_t, cnt_k);
    return 0;
}
0