結果

問題 No.182 新規性の虜
ユーザー angel_p_57angel_p_57
提出日時 2016-01-17 11:28:25
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 202 ms / 5,000 ms
コード長 335 bytes
コンパイル時間 356 ms
コンパイル使用メモリ 51,452 KB
実行使用メモリ 185,364 KB
最終ジャッジ日時 2023-08-27 07:43:26
合計ジャッジ時間 2,515 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 148 ms
141,840 KB
testcase_09 AC 202 ms
185,364 KB
testcase_10 AC 180 ms
172,968 KB
testcase_11 AC 162 ms
155,504 KB
testcase_12 AC 90 ms
86,380 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 1 ms
4,380 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 7 ms
4,380 KB
testcase_19 AC 6 ms
4,380 KB
testcase_20 AC 4 ms
4,376 KB
testcase_21 AC 8 ms
4,380 KB
testcase_22 AC 4 ms
4,380 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 9 ms
4,380 KB
testcase_25 AC 7 ms
4,500 KB
testcase_26 AC 41 ms
43,176 KB
testcase_27 AC 2 ms
4,380 KB
evil01.txt AC 65 ms
60,624 KB
evil02.txt AC 42 ms
34,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdint>

using namespace std;

uint64_t m[1<<25];
int main(void)
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n,a;
  cin>>n;
  a=-n;
  for ( int x;cin>>x; )
  {
    int i=x>>5;
    int sw=x*2&62;
    int c=(m[i]>>sw)&3;
    a+=(9>>(2-c))&3;
    m[i]^=((uint64_t)13>>(c*2)&3)<<sw;
  }
  cout<<a;
}
0