提交记录 3784
| 用户 | 题目 | 状态 | 得分 | 用时 | 内存 | 语言 | 代码长度 |
|---|---|---|---|---|---|---|---|
| attack | noi18c. 【NOI2018】你的名字 | Time Limit Exceeded | 0 | 4 s | 1113088 KB | C++ | 1.16 KB |
| 提交时间 | 评测时间 |
|---|---|
| 2018-07-18 17:34:52 | 2020-07-31 21:38:44 |
#include<cstdio>
#include<map>
#include<cstring>
#include<queue>
#include<algorithm>
#include<iostream>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/hash_policy.hpp>
using namespace __gnu_pbds;
#define rg register
using namespace std;
const int MAXN = 1001, INF = 1e9 + 10, mod = 998244353;
inline int read() {
char c = getchar(); int x = 0, f = 1;
while(c < '0' || c > '9') {if(c == '-') f = -1; c = getchar();}
while(c >= '0' && c <= '9')x = x * 10 + c - '0', c = getchar();
return x * f;
}
int N;
char a[MAXN], q[MAXN];
cc_hash_table<string, bool> mp, happen;
int main() {
scanf("%s", a + 1);
N = strlen(a + 1);
for(int i = 1; i <= N; i++) {
string s; s.clear();
for(int j = i; j <= N; j++) {
s += a[j];
mp[s] = 1;
}
}
int Q = read();
while(Q--) {
int l, r, ans = 0, len;
scanf("%s %d %d", q + 1, &l, &r);
happen.clear();
len = strlen(q + 1);
for(int i = 1; i <= len; i++) {
string s; s.clear();
for(int j = i; j <= len; j++) {
s += q[j];
//cout << s << endl;
if(mp[s] == 0 && happen[s] == 0) ans++, happen[s] = 1;
}
}
printf("%d\n", ans);
}
return 0;
}
/*
scbamgepe
3
smape 2 7
sbape 3 8
sgepe 1 9
*/
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 4 s | 481 MB + 916 KB | Time Limit Exceeded | Score: 0 | 显示更多 |
| Testcase #2 | 4 s | 529 MB + 692 KB | Time Limit Exceeded | Score: 0 | 显示更多 |
| Testcase #3 | 4 s | 528 MB + 140 KB | Time Limit Exceeded | Score: 0 | 显示更多 |
| Testcase #4 | 3.672 s | 1087 MB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #5 | 3.711 s | 1087 MB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #6 | 63.04 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #7 | 61.82 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #8 | 61.41 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #9 | 61.36 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #10 | 61.32 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #11 | 61.3 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #12 | 61.45 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #13 | 60.12 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #14 | 60.69 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #15 | 60.19 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #16 | 61.52 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #17 | 60.97 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #18 | 61 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #19 | 61.23 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #20 | 60.55 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #21 | 62.24 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #22 | 61.05 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #23 | 61.43 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #24 | 61.41 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #25 | 60.37 us | 32 KB | Runtime Error | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-04-18 01:12:50 | Loaded in 2 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠