제출 #1100406

#제출 시각아이디문제언어결과실행 시간메모리
1100406codexistentRima (COCI17_rima)C++14
0 / 140
65 ms262144 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define FOR(i, a, b) for(ll i = a; i <= b; i++) struct Trie{ ll nx[26], ct = 0; Trie () { FOR(i, 0, 25) nx[i] = -1; } }; ll n, trie_idx = 1; Trie trie[3000005]; int main(){ char c = 'b'; FOR(i, 1, 3000000){ ll ptr = 0; if(trie[ptr].nx[c - 'a'] == -1){ trie[ptr].nx[c - 'a'] = trie_idx; trie_idx++; } ptr = trie[ptr].nx[c - 'a']; trie[ptr].ct++; } }
#Verdict Execution timeMemoryGrader output
Fetching results...