結果
問題 | No.1072 A Nice XOR Pair |
ユーザー | kotatsugame |
提出日時 | 2020-06-05 21:36:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 254 ms / 2,000 ms |
コード長 | 204 bytes |
コンパイル時間 | 874 ms |
コンパイル使用メモリ | 77,276 KB |
実行使用メモリ | 19,072 KB |
最終ジャッジ日時 | 2024-12-17 13:42:23 |
合計ジャッジ時間 | 2,406 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 6 | main() | ^~~~
ソースコード
#include<iostream> #include<map> using namespace std; int N,X; map<int,int>mp; main() { cin>>N>>X; long ans=0; for(int i=0;i<N;i++) { int A;cin>>A; ans+=mp[X^A]; mp[A]++; } cout<<ans<<endl; }