結果
| 問題 |
No.1304 あなたは基本が何か知っていますか?私は知っています.
|
| コンテスト | |
| ユーザー |
tempura_pp
|
| 提出日時 | 2020-12-01 02:07:21 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 688 bytes |
| コンパイル時間 | 928 ms |
| コンパイル使用メモリ | 114,756 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-06-22 02:27:28 |
| 合計ジャッジ時間 | 5,209 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 TLE * 1 -- * 70 |
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
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(i!=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;
}
tempura_pp