結果
問題 |
No.1765 While Shining
|
ユーザー |
![]() |
提出日時 | 2021-11-30 00:51:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 329 bytes |
コンパイル時間 | 1,480 ms |
コンパイル使用メモリ | 167,876 KB |
実行使用メモリ | 10,916 KB |
最終ジャッジ日時 | 2024-07-02 14:22:17 |
合計ジャッジ時間 | 6,196 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 TLE * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A( N ); for( int i = 0; i < N; i++ ) cin >> A[i]; int ans = 0; for( int i = 0; i < N; i++ ) { int f = 0; for( int j = i; j < N - 1; j++ ) { if( (f ^ A[j]) == 0 ) break; ans++; f = 1 - f; } } cout << ans << endl; }