QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#407477 | #6528. Sequence | stegatxins0# | 0 | 0ms | 0kb | C++17 | 539b | 2024-05-08 19:39:52 | 2024-05-08 19:39:52 |
answer
#include <bits/stdc++.h>
#include "sequence.h"
using namespace std;
#ifdef DEBUG
#include "debug.cpp"
#else
#define dbg(...)
#define dbgarr(...)
#endif
const int mxN = 5e5+3;
int sequence(int N, std::vector<int> A) {
int ans = 0;
int cnt[mxN];
memset(cnt,0,sizeof(cnt));
for(int i=0; i<N; i++){
cnt[A[i]]++;
ans = max(ans, cnt[A[i]]);
if(i > 0)assert(A[i] >= A[i-1]);
}
// for(auto x:mp){
// ans = max(ans, x.second);
// }
return ans;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Runtime Error
Test #1:
score: 0
Runtime Error
input:
8wq90di9812978rqwiok0k0o21klklm21oiwi121 98 92 89 9 86 80 6 42 20 84 82 46 56 52 30 44 39 35 82 57 33 18 38 32 63 27 55 33 44 41 39 62 26 46 59 21 85 36 60 7 36 50 22 87 83 71 27 4 3 87 47 17 62 70 24 9 20 81 21 57 50 13 32 68 70 11 95 5 56 64 90 47 42 44 72 71 46 84 72 56 63 37 35 80 78 4 54 74 79 ...
output:
Unauthorized output
result:
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Runtime Error
Test #20:
score: 0
Runtime Error
input:
8wq90di9812978rqwiok0k0o21klklm21oiwi121 499996 53 78 81 111 119 124 126 130 164 175 219 227 233 249 282 298 332 341 348 436 437 448 452 455 462 465 495 535 557 558 576 600 620 627 632 642 643 659 695 696 713 730 743 805 816 865 869 872 875 882 883 902 924 937 990 998 1025 1092 1137 1145 1166 1176 1...
output:
Unauthorized output
result:
Subtask #4:
score: 0
Runtime Error
Test #28:
score: 0
Runtime Error
input:
8wq90di9812978rqwiok0k0o21klklm21oiwi121 499999 2 1 2 2 2 1 2 3 1 3 1 2 2 1 2 1 1 2 1 1 2 1 1 2 1 2 1 1 1 1 1 2 2 1 1 2 1 1 1 2 1 2 1 1 1 2 3 3 3 3 1 3 1 2 2 1 1 1 3 1 3 1 1 2 1 2 2 2 1 3 2 1 1 1 2 2 1 2 2 3 1 2 2 1 2 2 1 1 2 1 1 2 2 1 2 2 1 1 1 1 2 2 1 1 1 1 1 2 1 1 2 1 1 3 2 1 1 1 3 1 1 2 1 3 1 1 ...
output:
Unauthorized output
result:
Subtask #5:
score: 0
Runtime Error
Test #33:
score: 0
Runtime Error
input:
8wq90di9812978rqwiok0k0o21klklm21oiwi121 499999 490225 471440 499001 369862 494577 479599 486292 476071 471988 486939 482356 482290 497141 488452 495446 494292 404798 493826 482595 481107 447196 477441 418064 495941 448927 483365 418585 489220 443224 482574 487957 467944 493253 472016 475543 442250 ...
output:
Unauthorized output
result:
Subtask #6:
score: 0
Skipped
Dependency #2:
0%
Subtask #7:
score: 0
Skipped
Dependency #1:
0%