結果

提出番号 2050
提出者 heno239
言語 C++
提出日時 2018-08-04 15:05:26
問題名 (64)Or Plus Max 2
結果 TLE
点数 0%

テストケース

テストケース 結果 得点 実行時間 メモリ使用量
1 AC 100% 2ms 8432KB
2 WA 0% 2ms 8432KB
3 WA 0% 2ms 8400KB
4 WA 0% 354ms 8256KB
5 WA 0% 4ms 7824KB
6 WA 0% 182ms 8704KB
7 WA 0% 2ms 8048KB
8 WA 0% 3ms 8368KB
9 TLE 0% 12363ms 8368KB
10 WA 0% 2ms 8080KB
11 WA 0% 47ms 7968KB
12 AC 100% 2ms 8416KB
テストケース 結果 得点 実行時間 メモリ使用量
13 TLE 0% 20001ms 0KB
14 TLE 0% 20002ms 0KB
15 TLE 0% 20001ms 0KB
16 TLE 0% 20002ms 0KB
17 TLE 0% 20002ms 0KB
18 TLE 0% 20002ms 0KB
19 TLE 0% 20002ms 0KB
20 TLE 0% 20001ms 0KB
テストケース 結果 得点 実行時間 メモリ使用量
21 TLE 0% 20001ms 0KB
22 TLE 0% 20002ms 0KB
23 TLE 0% 20001ms 0KB
24 TLE 0% 20002ms 0KB
25 TLE 0% 20002ms 0KB
26 TLE 0% 20002ms 0KB
27 TLE 0% 20002ms 0KB
28 TLE 0% 20002ms 0KB
29 TLE 0% 20002ms 0KB
30 TLE 0% 20001ms 0KB
テストケース 結果 得点 実行時間 メモリ使用量
31 TLE 0% 20002ms 0KB
32 TLE 0% 20002ms 0KB
33 TLE 0% 20002ms 0KB
34 TLE 0% 20001ms 0KB
35 TLE 0% 20001ms 0KB
36 TLE 0% 20001ms 0KB
37 TLE 0% 20001ms 0KB
38 TLE 0% 20001ms 0KB
39 TLE 0% 20001ms 0KB
40 TLE 0% 20002ms 0KB
41 TLE 0% 20002ms 0KB

ソースコード

#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll MOD = (1e+9)+7;
const ll INF = (ll)1000000007 * 1000000007;
typedef pair<ll, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef long double ld;
typedef complex<ld> Point;
const ld eps = 1e-11;
const ld pi = acos(-1.0);
typedef pair<ll, ll> LP;
typedef pair<ld, ld> LDP;
typedef pair<P, int> PP;
int cnt = 0;
int a[7]; int n; int p;
int dfs(int k) {
	int res = 0;
	if (k == n) {
		int sum = 0; int xsum = 0;
		rep(i, n) {
			xsum ^= a[i]; sum += a[i];
		}
		if (sum == xsum)res = 1;
	}
	else {
		Rep(j,1, p) {
			a[k] = j;
			res += dfs(k + 1);
		}
	}
	return res;
}
int main(){
	cin >> n >> p;
	cout << dfs(0) << endl;
	return 0;
}