제출 #698509

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
6985092023-02-13 16:30:51dattranxxxPalindromic Partitions (CEOI17_palindromic)C++11
100 / 100
174 ms44292 KiB
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int M = 1e9 + 696969;
struct Hash {
int x; unsigned long long y;
Hash(int x = 0): x(x), y(x) {}
friend Hash operator + (Hash u, const Hash& v) {
u.x += v.x; u.y += v.y;
if (u.x >= M) u.x -= M;
return u;
}
friend Hash operator - (Hash u, const Hash& v) {
u.x -= v.x; u.y -= v.y;
if (u.x < 0) u.x += M;
return u;
}
friend Hash operator * (Hash u, const Hash& v) {
u.x = 1LL * u.x * v.x % M;
u.y = u.y * v.y;
return u;
}
friend bool operator == (const Hash& u, const Hash& v) {
return u.x == v.x && u.y == v.y;
}
};
using ull = Hash;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...