結果
| 問題 | No.723 2つの数の和 |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-06-08 04:28:51 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 561 bytes |
| 記録 | |
| コンパイル時間 | 941 ms |
| コンパイル使用メモリ | 174,500 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-08 04:28:55 |
| 合計ジャッジ時間 | 2,608 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 WA * 17 RE * 2 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define int long long
int32_t main(){
int n, x, c = 0, soma = 0, zeros = 0, xs = 0;
cin >> n >> x;
for(int i = 0; i < n; i++){
int a;
cin >> a;
if(a*2 == x){
c++;
}
if(a < x){
soma += a;
}
if(a == x){
xs++;
}
if(a == 0){
zeros ++;
}
}
if(zeros >= xs){
c+= xs*2;
}
else{
c+= zeros*2;
}
cout << c + (soma/x)*2 << endl;
return 0;
}
vjudge1