Submission #22626

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
226262017-04-30 06:00:22카시코이 (#40)Window Xor (KRIII5_WX)C++14
0 / 7
1000 ms16932 KiB
#include<cstdio>
#include<vector>
#include<complex>
#include<algorithm>
using namespace std;
const int NMAX = 100001;
const double PI = atan2(1, 0) * 2;
typedef complex<double> idouble;
typedef vector<idouble> poly;
typedef vector<int> vi;
int rev(int x, int sz) {
int i, r = 0;
for (i = 0; i < sz; i++) {
r = r << 1 | x & 1;
x >>= 1;
}
return r;
}
void fft(poly& a, bool f = false) {
const int N = a.size();
int sz = 0, t = 1;
while (t < N) sz++, t <<= 1;
idouble x, y, z;
double w;
int i, j, k;
for (i = 0; i < N; i++) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

WX.cpp: In function 'int rev(int, int)':
WX.cpp:17:18: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
   r = r << 1 | x & 1;
                  ^
WX.cpp: In function 'vi mult(const vi&, const vi&)':
WX.cpp:59:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i<A.size(); i++) a[i] = A[i];
                   ^
WX.cpp:60:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i<B.size(); i++) b[i] = B[i];
                   ^
WX.cpp: In function 'int main()':
WX.cpp:92:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d%lld", &N, &K, &T);
                               ^
WX.cpp:93:48: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for (int i = 0; i < N; i++) scanf("%d", A + i);
                                                ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...