結果
| 問題 | No.2835 Take and Flip |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-10 09:33:46 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 489 bytes |
| 記録 | |
| コンパイル時間 | 4,117 ms |
| コンパイル使用メモリ | 375,244 KB |
| 実行使用メモリ | 7,976 KB |
| 最終ジャッジ日時 | 2026-04-03 20:44:17 |
| 合計ジャッジ時間 | 5,905 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 22 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:20:10: warning: 's' may be used uninitialized [-Wmaybe-uninitialized]
20 | s+=a;
| ~^~~
main.cpp:16:8: note: 's' was declared here
16 | ll s;
| ^
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using mint = atcoder::static_modint<998244353>;
//using mint = atcoder::static_modint<1000000007>;
using namespace std;
using namespace atcoder;
using ld = long double;
using ll = long long;
#define mp(a,b) make_pair(a,b)
#define rep(i,s,n) for(int i=s; i<n; i++)
const vector<int> dx{1,0,-1,0},dy{0,1,0,-1};
int main(){
int n;
cin >> n;
ll s;
rep(i,0,n){
ll a;
cin >> a;
s+=a;
}
cout << s;
}