QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#142749#6661. 야유회penguinman0 0ms0kbC++171.1kb2023-08-19 20:03:272023-08-19 20:03:28

Judging History

你现在查看的是最新测评结果

  • [2023-08-19 20:03:28]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-08-19 20:03:27]
  • 提交

answer

#include "workshop.h"

#include <bits/stdc++.h>

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;
using ll = long long;
using vi = vector<ll>;
using vii = vector<vi>;
using pii = std::pair<ll,ll>;

#define rep(i,j,k) for(ll i=ll(j); i<ll(k); i++)
#define REP(i,j,k) for(ll i=ll(j); i<=ll(k); i++)
#define per(i,j,k) for(ll i=ll(j); i>=ll(k); i--)
#define ln "\n"
#define all(a) a.begin(),a.end()
#define pb emplace_back
#define mp std::make_pair
#define mtp std::make_tuple

void init() { }

int f(int x, int y){
    constexpr int LOG = 20;
    rep(i,0,LOG){
        ll a = (x & (1ll<<i));
        ll b = (y & (1ll<<i));
        if(a != b){
            int ret = i;
            if(a) ret++;
            return ret;
        }
    }
}

int morning(int my_num, int right_num) {
    return f(my_num, right_num);
}

int afternoon(int left_num, int my_num, int right_num) {
    return f(my_num, right_num);
}

int evening(int left_num, int my_num, int right_num) {
    return f(my_num, right_num);
}

詳細信息

Subtask #1:

score: 0
Time Limit Exceeded

Test #1:

score: 0
Time Limit Exceeded

input:

2dc2b1d4-8de2-INPUT-bcd3-aa55b691fdb3
1
2
40 40
0 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 40
0 3 1 5 7 9 6 4 2 10 8 23 21 25 27 29 26 24 22 30 28 13 11 15 17 19 16 14 12 20 18 33 31 35 37 39 36 34 32 38

output:


result:


Subtask #2:

score: 0
Time Limit Exceeded

Test #8:

score: 0
Time Limit Exceeded

input:

2dc2b1d4-8de2-INPUT-bcd3-aa55b691fdb3
2
2
40 40
0 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 40
0 3 1 5 7 9 6 4 2 10 8 23 21 25 27 29 26 24 22 30 28 13 11 15 17 19 16 14 12 20 18 33 31 35 37 39 36 34 32 38

output:


result: