# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
223256 | dantoh000 | Matching (COCI20_matching) | C++14 | 20 ms | 1024 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod = 1000000007;
int n,k;
ll KEY = 998244353;
ll f[55];
int v[26];
unordered_map<ll,int> ct;
ll HASH(string s){
ll res = 0;
for (int i = 0; i < s.size(); i++){
res = ((res*KEY) + v[s[i]-'a'])%mod;
}
return res;
}
ll a[55][1505];
int dp[2][1505];
bool can(ll a, ll b, int len){
for (int i = 0; i < 26; i++){
if ((a*KEY + v[i])%mod == b || (a + i*f[len])%mod == b) return true;
}
return false;
}
int main(){
iota(v,v+26,1);
random_shuffle(v,v+26);
//for (int i = 0; i < 26; i++) printf("%d ",v[i]);
f[0] = 1;
for (int i = 1; i <= 50; i++){
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |