結果
| 問題 | 
                            No.1389 Clumsy Calculation
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-02-28 15:35:55 | 
| 言語 | C++17(clang)  (17.0.6 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 440 bytes | 
| コンパイル時間 | 2,313 ms | 
| コンパイル使用メモリ | 119,808 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-02 18:14:46 | 
| 合計ジャッジ時間 | 6,277 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | AC * 24 WA * 2 | 
ソースコード
#include <stdio.h>
#include <iostream>
#include <vector>
using namespace std;
#define LL long long
int main() {
  int N; cin >> N;
  LL X, sum = 0; cin >> X;
  
  vector<LL> S(N);
  for (int i = 0; i < N; i++) {
    cin >> S[i];
    sum += S[i];
  }
  for (int i = 0; i < N; i++) {
    if ((S[i] & 1) == 1) {
      continue;
    }
    if (2 * sum - S[i] == 2 * (N - 1) * X) {
      cout << S[i] / 2 << endl;
    }
  }
  return 0;
}