# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1083133 | 2024-09-02T16:07:55 Z | 8pete8 | Broken Device (JOI17_broken_device) | C++17 | 36 ms | 2868 KB |
#include "Annalib.h" #include<iostream> #include<stack> #include<map> #include<vector> #include<string> #include<cassert> #include<unordered_map> #include <queue> #include <cstdint> #include<cstring> #include<limits.h> #include<cmath> #include<set> #include<algorithm> #include <iomanip> #include<numeric> #include<bitset> using namespace std; #define ll long long #define f first #define s second #define pii pair<int,int> #define ppii pair<int,pii> #define vi vector<int> #define pb push_back #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define F(n) for(int i=0;i<n;i++) #define lb lower_bound #define ub upper_bound #define fastio ios::sync_with_stdio(false);cin.tie(NULL); #pragma GCC optimize ("03,unroll-lopps") void Anna( int N, long long X, int K, int P[] ){ vector<int>can(N,1); for(int i=0;i<K;i++)can[P[i]]=0; int cur=0,pos=0; vector<int>need; for(int i=0;i<60;i++){ long long x=(X&(1LL<<i)); need.pb(!!x); } int cnt=0,last=-1; for(int j=0;j<N;j++){ if(can[j]==0||cur>=need.size())Set(j,0); else if(can[j]){ if(need[cur]){ if(j%2==1)Set(j,1),cur++; else Set(j,0); } else{ if(j%2==0)Set(j,1),cur++; else Set(j,0); } } } } /* 1 150 576460752303423487 35 107 9 73 83 134 28 69 60 8 36 55 79 58 18 0 33 149 130 104 63 30 80 96 48 144 133 19 74 125 11 52 142 120 112 56 */
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Partially correct | 20 ms | 2772 KB | Output is partially correct - L* = 31 |
2 | Partially correct | 20 ms | 2816 KB | Output is partially correct - L* = 17 |
3 | Partially correct | 20 ms | 2772 KB | Output is partially correct - L* = 24 |
4 | Partially correct | 20 ms | 2772 KB | Output is partially correct - L* = 18 |
5 | Partially correct | 20 ms | 2776 KB | Output is partially correct - L* = 25 |
6 | Partially correct | 23 ms | 2860 KB | Output is partially correct - L* = 17 |
7 | Partially correct | 23 ms | 2772 KB | Output is partially correct - L* = 23 |
8 | Partially correct | 36 ms | 2820 KB | Output is partially correct - L* = 29 |
9 | Partially correct | 22 ms | 2856 KB | Output is partially correct - L* = 29 |
10 | Partially correct | 22 ms | 2784 KB | Output is partially correct - L* = 31 |
11 | Partially correct | 22 ms | 2768 KB | Output is partially correct - L* = 20 |
12 | Partially correct | 20 ms | 2772 KB | Output is partially correct - L* = 21 |
13 | Partially correct | 28 ms | 2772 KB | Output is partially correct - L* = 28 |
14 | Partially correct | 20 ms | 2780 KB | Output is partially correct - L* = 19 |
15 | Partially correct | 27 ms | 2796 KB | Output is partially correct - L* = 34 |
16 | Partially correct | 20 ms | 2772 KB | Output is partially correct - L* = 18 |
17 | Partially correct | 22 ms | 2780 KB | Output is partially correct - L* = 17 |
18 | Partially correct | 20 ms | 2780 KB | Output is partially correct - L* = 30 |
19 | Partially correct | 22 ms | 2776 KB | Output is partially correct - L* = 29 |
20 | Partially correct | 20 ms | 2752 KB | Output is partially correct - L* = 21 |
21 | Partially correct | 22 ms | 2808 KB | Output is partially correct - L* = 31 |
22 | Partially correct | 20 ms | 2816 KB | Output is partially correct - L* = 29 |
23 | Partially correct | 20 ms | 2776 KB | Output is partially correct - L* = 26 |
24 | Partially correct | 20 ms | 2868 KB | Output is partially correct - L* = 22 |
25 | Partially correct | 22 ms | 2784 KB | Output is partially correct - L* = 29 |
26 | Partially correct | 20 ms | 2772 KB | Output is partially correct - L* = 23 |
27 | Partially correct | 27 ms | 2772 KB | Output is partially correct - L* = 31 |
28 | Partially correct | 20 ms | 2748 KB | Output is partially correct - L* = 23 |
29 | Partially correct | 20 ms | 2860 KB | Output is partially correct - L* = 27 |
30 | Partially correct | 20 ms | 2776 KB | Output is partially correct - L* = 28 |
31 | Partially correct | 22 ms | 2856 KB | Output is partially correct - L* = 32 |
32 | Partially correct | 22 ms | 2752 KB | Output is partially correct - L* = 34 |
33 | Partially correct | 22 ms | 2772 KB | Output is partially correct - L* = 18 |
34 | Partially correct | 22 ms | 2768 KB | Output is partially correct - L* = 35 |
35 | Partially correct | 20 ms | 2776 KB | Output is partially correct - L* = 26 |
36 | Partially correct | 20 ms | 2784 KB | Output is partially correct - L* = 20 |
37 | Partially correct | 22 ms | 2776 KB | Output is partially correct - L* = 20 |
38 | Partially correct | 20 ms | 2748 KB | Output is partially correct - L* = 30 |
39 | Partially correct | 25 ms | 2772 KB | Output is partially correct - L* = 26 |
40 | Partially correct | 23 ms | 2780 KB | Output is partially correct - L* = 29 |