# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
45142 | nibnalin | 세 명의 친구들 (BOI14_friends) | C++17 | 1063 ms | 68276 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
typedef long long int lli;
const lli maxn = lli(2e6)+5, MOD = lli(1e9)+11, charsz = 31;
lli n;
string S;
pair<lli, lli> st[4*maxn+10];
lli modpow(lli a, lli b)
{
if(!b) return 1ll;
else
{
lli res = modpow(a, b/2ll);
res *= res;
res %= MOD;
if(b%2) res *= a%MOD;
return res%MOD;
}
}
pair<lli, lli> combine(pair<lli, lli> a, pair<lli, lli> b)
{
pair<lli, lli> res = {a.first, a.second+b.second};
res.first += (b.first%MOD*modpow(charsz, a.second)%MOD)%MOD;
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |