結果
問題 |
No.45 回転寿司
|
ユーザー |
![]() |
提出日時 | 2025-06-19 16:37:48 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 327 bytes |
コンパイル時間 | 854 ms |
コンパイル使用メモリ | 85,024 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-06-19 16:37:51 |
合計ジャッジ時間 | 2,294 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 4 |
other | WA * 30 |
ソースコード
#include <iostream> #include<vector> using namespace std; int main() { vector<int> v = {1,2,3,4,5}; int sum = 0; for (int i = 0; i < v.size(); i++) { int temp = v[i]; for (int j = i + 2; j < v.size(); j+=2) { temp += v[j]; } sum = max(sum, temp); } cout << sum; }