QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#410249#677. Koala GameYahia_Emara#4 3ms4060kbC++202.3kb2024-05-13 19:51:142024-05-13 19:51:14

Judging History

This is the latest submission verdict.

  • [2024-05-13 19:51:14]
  • Judged
  • Verdict: 4
  • Time: 3ms
  • Memory: 4060kb
  • [2024-05-13 19:51:14]
  • Submitted

answer

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define pb push_back
#define LOOP(n) for(int rp=0;rp<(n);rp++)
#define sz(x) int(x.size())
#define bk(x) x.back()
#define dbg(x) cout << (#x) << " : " << x << endl
#define sdbg(x) cout << (#x) << " : " << x << "\n"
#define dbeg(x) cout << (#x) << " : " << x << ", "
#define sq(x) ((x)*(x))
#define lsb(x) ((x)&(-(x)))
#define sqm(x) mul((x),(x))
#define isnp(x) ((x)&((x)-1))
#define all(x) x.begin(),x.end()
#define fs first
#define sc second
#define fsh cout.flush()
using namespace std;
using namespace __gnu_pbds;
#define OS tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>
#define ofk order_of_key
//#pragma GCC optimize("trapv")
#pragma GCC optimize("Ofast","unroll-loops","O3")
#pragma GCC target("avx2")
mt19937_64 rng(time(0));
int rnd(int l,int r){
    return uniform_int_distribution<int>(l,r)(rng);
}
typedef long long ll;
typedef long double dl;
typedef unsigned long long ull;
const int SZ=5e5+7,MSZ=2e5+7;
const ll INF=1e18+7;
const dl eps=1e-18;
int MOD=1e9+7;
ll trig(ll n){
    return n*(n+1)/2;
}
int getN(){
    int n;cin >> n;
    return n;
}
#include "koala.h"
//#include "grader.cpp"
int minValue(int n,int w) {
    // TODO: Implement Subtask 1 solution here.
    // You may leave this function unmodified if you are not attempting this
    // subtask.
    int b[n]{},r[n];
    b[0]=1;
    playRound(b,r);
    for(int i=0;i<n;i++){
        if(r[i]==0)return i;
    }
    return 0;
}
int maxValue(int N, int W) {
    // TODO: Implement Subtask 2 solution here.
    // You may leave this function unmodified if you are not attempting this
    // subtask.
    return 0;
}
int greaterValue(int N, int W) {
    // TODO: Implement Subtask 3 solution here.
    // You may leave this function unmodified if you are not attempting this
    // subtask.
    return 0;
}
void allValues(int N, int W, int *P) {
    if (W == 2*N) {
        // TODO: Implement Subtask 4 solution here.
        // You may leave this block unmodified if you are not attempting this
        // subtask.
    } else {
        // TODO: Implement Subtask 5 solution here.
        // You may leave this block unmodified if you are not attempting this
        // subtask.
    }
}

詳細信息

Subtask #1:

score: 4
Accepted

Test #1:

score: 4
Accepted
time: 2ms
memory: 4060kb

input:

1 100 2
100 100 46 17 44 52 18 67 69 100 62 96 33 64 41 47 87 54 99 32 14 4 89 73 70 20 81 42 8 80 65 88 36 11 53 98 56 94 79 57 1 76 31 7 72 13 21 92 86 66 90 24 40 75 68 15 37 25 43 58 60 3 82 85 28 16 71 97 22 38 9 39 48 78 74 91 50 35 29 27 10 12 6 19 5 34 95 59 93 83 30 49 51 61 26 23 77 55 45 ...

output:

1

result:

points 1.0 number of queries is 1

Test #2:

score: 4
Accepted
time: 2ms
memory: 3940kb

input:

1 100 2
100 100 68 30 61 13 87 15 18 63 49 73 82 57 19 45 40 92 48 41 97 31 44 8 71 77 35 65 95 28 6 94 74 7 53 46 81 88 3 91 72 62 36 50 12 21 54 26 24 2 47 80 39 4 55 27 51 70 96 34 89 75 16 29 58 9 98 99 83 33 42 32 11 69 14 5 66 86 100 22 67 38 52 79 59 93 60 56 20 25 76 43 84 90 78 37 1 17 10 2...

output:

1

result:

points 1.0 number of queries is 1

Test #3:

score: 4
Accepted
time: 3ms
memory: 4060kb

input:

1 100 2
100 100 73 64 94 19 67 57 90 6 97 12 15 18 32 95 5 55 76 36 25 75 59 74 49 83 20 99 8 70 33 14 39 10 23 53 79 58 46 47 29 44 88 87 9 1 82 71 38 37 86 51 13 42 93 43 78 30 54 4 98 91 48 62 72 68 56 96 31 17 24 2 35 21 77 81 41 52 69 61 11 84 89 92 50 100 45 22 28 66 65 26 80 27 40 16 60 85 3 ...

output:

1

result:

points 1.0 number of queries is 1

Test #4:

score: 4
Accepted
time: 2ms
memory: 4020kb

input:

1 99 2
100 100 53 64 41 55 63 58 60 56 44 57 61 46 54 49 45 59 47 42 43 40 48 62 50 51 52 36 38 39 33 32 37 34 35 92 91 95 93 94 98 96 97 90 66 68 70 69 67 65 11 12 8 10 9 30 29 31 100 99 6 2 4 7 1 5 3 17 14 13 18 15 19 16 79 84 75 77 85 78 88 72 89 73 87 74 83 86 76 81 71 80 82 25 21 23 24 26 22 28...

output:

1

result:

points 1.0 number of queries is 1

Subtask #2:

score: 0
Wrong Answer

Test #5:

score: 0
Wrong Answer
time: 0ms
memory: 3924kb

input:

2 100 13
100 100 65 36 67 86 38 76 15 17 13 93 83 57 46 90 14 2 52 88 29 74 55 66 79 75 37 81 87 47 56 25 33 39 8 31 64 73 98 78 100 94 10 58 61 70 53 54 21 49 16 5 4 85 44 62 27 92 91 26 72 41 42 99 89 77 12 69 60 24 3 30 40 1 84 68 59 28 11 71 96 97 63 32 18 34 43 82 48 35 95 80 7 45 19 23 51 22 5...

output:

-1

result:

wrong answer 

Subtask #3:

score: 0
Wrong Answer

Test #9:

score: 0
Wrong Answer
time: 0ms
memory: 3932kb

input:

3 1100 14
100 100 50 78 94 90 6 24 52 93 73 4 7 5 40 2 17 41 27 8 21 16 64 80 96 12 46 57 38 22 69 92 47 10 60 13 76 62 30 74 31 82 91 32 36 53 84 98 44 77 19 49 83 71 79 15 87 37 20 85 48 51 68 55 3 81 1 34 99 97 26 9 75 35 28 56 33 65 54 25 18 66 11 63 43 61 88 45 89 23 39 29 100 58 67 95 42 59 72...

output:

-1

result:

wrong answer 

Subtask #4:

score: 0
Wrong Answer

Test #19:

score: 0
Wrong Answer
time: 0ms
memory: 3972kb

input:

4 1 700
100 200 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98...

output:

-1

result:

wrong answer 

Subtask #5:

score: 0
Wrong Answer

Test #39:

score: 0
Wrong Answer
time: 0ms
memory: 3920kb

input:

4 1 3200
100 100 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 9...

output:

-1

result:

wrong answer