結果
| 問題 | No.3718 XOR Escape |
| ユーザー |
C
|
| 提出日時 | 2026-11-11 15:20:23 |
| 言語 | C++23(gcc16) (gcc 16.2.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 743µs | |
| コード長 | 1,112 bytes |
| 記録 | |
| コンパイル時間 | 5,608 ms |
| コンパイル使用メモリ | 407,800 KB |
| 実行使用メモリ | 9,872 KB |
| 最終ジャッジ日時 | 2026-11-11 15:20:33 |
| 合計ジャッジ時間 | 7,750 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 18 |
ソースコード
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#include <atcoder/all>
#include <boost/polygon/point_data.hpp>
#include <boost/polygon/voronoi.hpp>
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(x) begin(x),end(x)
#define sz(x) (int)(x).size()
using namespace std;
using namespace atcoder;
using ll=long long;
using ull=unsigned long long;
using ld=long double;
using vll=vector<ll>;
using vvll=vector<vll>;
using vi=vector<int>;
using vvi=vector<vi>;
using pll=pair<ll,ll>;
using pi=pair<int,int>;
// using mint=modint998244353;
using mint=modint1000000007;
// using mint2=static_modint<2>;
// using BoostPoint=boost::polygon::point_data<int>;
// using Voronoi=boost::polygon::voronoi_diagram<double>;
// using mint=LazyMontgomeryModInt<998244353>;
using vm=vector<mint>;
using vvm=vector<vm>;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
ull N,A,B,C;
cin>>N>>A>>B>>C;
auto count=[&](ull w)->ull{
if(w&(w+1))return 0;
int t=bit_width(w)-1;
return (N>>t)-(N>>(t+1));
};
cout<<N-count(A)-count(B)-count(C)<<'\n';
}
C