Submission #74697

# Submission time Handle Problem Language Result Execution time Memory
74697 2018-09-06T14:51:06 Z SpeedOfMagic Brunhilda’s Birthday (BOI13_brunhilda) C++17
0 / 100
1000 ms 66632 KB
/** MIT License Copyright (c) 2018 Vasilyev Daniil **/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
#pragma GCC optimize("Ofast")
template<typename T> using v = vector<T>;
template<typename T, typename U>  using hmap = __gnu_pbds::gp_hash_table<T, U>;
//#define int long long
typedef long double ld;
typedef string str;
typedef vector<int> vint;
#define rep(a, l, r) for(int a = (l); a < (r); a++)
#define pb push_back
#define fs first
#define sc second
#define sz(a) ((int) a.size())
const long long inf = 4611686018427387903; //2^62 - 1
#if 0  //FileIO
const string fileName = "";
ifstream fin ((fileName == "" ? "input.txt"  : fileName + ".in" ));
ofstream fout((fileName == "" ? "output.txt" : fileName + ".out"));
#define get fin>>
#define put fout<<
#else
#define get cin>>
#define put cout<<
#endif
#define eol put endl
#define check(a) put #a << ": " << a << endl;
void read() {}     template<typename Arg,typename... Args> void read (Arg& arg,Args&... args){get (arg)     ;read(args...) ;}
void print(){}     template<typename Arg,typename... Args> void print(Arg  arg,Args...  args){put (arg)<<" ";print(args...);}
void debug(){eol;} template<typename Arg,typename... Args> void debug(Arg  arg,Args...  args){put (arg)<<" ";debug(args...);}
int getInt(){int a; get a; return a;}
//code goes here
const long long N = 1e7 + 1;
const int LIM = 20;
int dp[N];
 
void run() {
    int m, q;
    read(m, q);
 
    vint primes;
    int p[m];
    
    vint vals;
    rep(i, 0, m) {
        get p[i];
        if (p[i] > LIM)
            for (int j = 1; j * p[i] < N; j++)
                vals.pb(j * p[i]);
        else
            primes.pb(p[i]);
    }
    
    sort(vals.begin(), vals.end());
}
 
int32_t main() {srand(time(0)); ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); put fixed; put setprecision(15); run(); return 0;}
# Verdict Execution time Memory Grader output
1 Incorrect 21 ms 2540 KB Output isn't correct
2 Incorrect 139 ms 8820 KB Output isn't correct
3 Incorrect 33 ms 8820 KB Output isn't correct
4 Incorrect 56 ms 8820 KB Output isn't correct
5 Incorrect 97 ms 8820 KB Output isn't correct
6 Incorrect 15 ms 8820 KB Output isn't correct
7 Incorrect 37 ms 8820 KB Output isn't correct
8 Incorrect 29 ms 8820 KB Output isn't correct
9 Incorrect 71 ms 8840 KB Output isn't correct
10 Incorrect 165 ms 17056 KB Output isn't correct
11 Incorrect 181 ms 17068 KB Output isn't correct
12 Incorrect 42 ms 17068 KB Output isn't correct
13 Incorrect 824 ms 66312 KB Output isn't correct
14 Incorrect 853 ms 66316 KB Output isn't correct
15 Incorrect 169 ms 66316 KB Output isn't correct
16 Incorrect 138 ms 66316 KB Output isn't correct
17 Incorrect 219 ms 66316 KB Output isn't correct
18 Incorrect 54 ms 66316 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 169 ms 66316 KB Output isn't correct
2 Incorrect 244 ms 66316 KB Output isn't correct
3 Execution timed out 1074 ms 66464 KB Time limit exceeded
4 Incorrect 306 ms 66464 KB Output isn't correct
5 Incorrect 776 ms 66464 KB Output isn't correct
6 Incorrect 135 ms 66464 KB Output isn't correct
7 Incorrect 160 ms 66464 KB Output isn't correct
8 Incorrect 307 ms 66464 KB Output isn't correct
9 Execution timed out 1049 ms 66464 KB Time limit exceeded
10 Execution timed out 1075 ms 66464 KB Time limit exceeded
11 Execution timed out 1069 ms 66520 KB Time limit exceeded
12 Incorrect 415 ms 66520 KB Output isn't correct
13 Incorrect 62 ms 66520 KB Output isn't correct
14 Incorrect 314 ms 66520 KB Output isn't correct
15 Incorrect 926 ms 66520 KB Output isn't correct
16 Incorrect 226 ms 66520 KB Output isn't correct
17 Incorrect 964 ms 66520 KB Output isn't correct
18 Incorrect 935 ms 66536 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 797 ms 66536 KB Output isn't correct
2 Execution timed out 1070 ms 66536 KB Time limit exceeded
3 Execution timed out 1071 ms 66536 KB Time limit exceeded
4 Incorrect 406 ms 66536 KB Output isn't correct
5 Incorrect 259 ms 66536 KB Output isn't correct
6 Incorrect 890 ms 66536 KB Output isn't correct
7 Incorrect 894 ms 66632 KB Output isn't correct
8 Incorrect 833 ms 66632 KB Output isn't correct
9 Incorrect 798 ms 66632 KB Output isn't correct
10 Incorrect 685 ms 66632 KB Output isn't correct
11 Incorrect 539 ms 66632 KB Output isn't correct
12 Incorrect 746 ms 66632 KB Output isn't correct
13 Execution timed out 1069 ms 66632 KB Time limit exceeded
14 Incorrect 267 ms 66632 KB Output isn't correct
15 Incorrect 818 ms 66632 KB Output isn't correct
16 Execution timed out 1028 ms 66632 KB Time limit exceeded
17 Execution timed out 1004 ms 66632 KB Time limit exceeded
18 Execution timed out 1086 ms 66632 KB Time limit exceeded
19 Incorrect 118 ms 66632 KB Output isn't correct
20 Execution timed out 1081 ms 66632 KB Time limit exceeded
21 Incorrect 393 ms 66632 KB Output isn't correct
22 Execution timed out 1077 ms 66632 KB Time limit exceeded
23 Incorrect 288 ms 66632 KB Output isn't correct
24 Incorrect 117 ms 66632 KB Output isn't correct
25 Incorrect 614 ms 66632 KB Output isn't correct
26 Incorrect 408 ms 66632 KB Output isn't correct
27 Execution timed out 1076 ms 66632 KB Time limit exceeded
28 Incorrect 122 ms 66632 KB Output isn't correct
29 Execution timed out 1072 ms 66632 KB Time limit exceeded
30 Execution timed out 1071 ms 66632 KB Time limit exceeded
31 Incorrect 226 ms 66632 KB Output isn't correct
32 Incorrect 313 ms 66632 KB Output isn't correct
33 Incorrect 51 ms 66632 KB Output isn't correct
34 Incorrect 913 ms 66632 KB Output isn't correct
35 Incorrect 206 ms 66632 KB Output isn't correct
36 Execution timed out 1060 ms 66632 KB Time limit exceeded
37 Incorrect 257 ms 66632 KB Output isn't correct
38 Incorrect 897 ms 66632 KB Output isn't correct
39 Incorrect 179 ms 66632 KB Output isn't correct
40 Incorrect 649 ms 66632 KB Output isn't correct
41 Incorrect 602 ms 66632 KB Output isn't correct
42 Incorrect 988 ms 66632 KB Output isn't correct