結果
問題 |
No.1304 あなたは基本が何か知っていますか?私は知っています.
|
ユーザー |
![]() |
提出日時 | 2020-12-01 03:45:39 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 441 bytes |
コンパイル時間 | 1,913 ms |
コンパイル使用メモリ | 193,464 KB |
実行使用メモリ | 11,044 KB |
最終ジャッジ日時 | 2025-06-22 02:30:33 |
合計ジャッジ時間 | 5,345 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 3 TLE * 1 -- * 70 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i ) #define rep(i,n) REP(i,0,n) int n, k, x, y, ans, a[8]; void dfs(int num, int val, int pre) { if(num == n){ ans += x<= val && val <= y; return; } rep(i,k){ if(a[i]!=a[pre])dfs(num+1,val^a[i],i); } } int main(){ cin>>n>>k>>x>>y; rep(i,k)cin>>a[i]; dfs(0,0,-1); cout<<ans<<endl; }