QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#228438#7638. Lakeucup-team1448#WA 0ms1640kbC++17796b2023-10-28 13:30:472023-10-28 13:30:48

Judging History

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

  • [2023-10-28 13:30:48]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:1640kb
  • [2023-10-28 13:30:47]
  • 提交

answer

//#define dxx
#ifdef dxx
#define dbg(...) fprintf(stderr,__VA_ARGS__)
#define dex(a) dbg(#a"=%lld onL%d infun %s\n",a,__LINE__,__FUNCTION__)
#include<cstdlib>
#define pause sys##tem("pause")
#define _GLIBCXX_DEBUG
#endif

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<vector>

using ll=long long;
using std::max;
using std::min;
using std::abs;
template<class T> void cmax(T&a,T b){a=max(a,b);}
template<class T> void cmin(T&a,T b){a=min(a,b);}
template<class T> T sqr(T a){return a*a;}

namespace xm{
    void _(){
        int N,M,child;

        scanf("%d%d",&N,&M);
        child=(M+3)/4;
        printf("%d\n",2*(child*3>=N?child:child+(N-child*3+3-(child*4>M))/4)-1);
    }
}

int main(){
    xm::_();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 1608kb

input:

1 1

output:

1

result:

ok single line: '1'

Test #2:

score: 0
Accepted
time: 0ms
memory: 1528kb

input:

1 4

output:

1

result:

ok single line: '1'

Test #3:

score: 0
Accepted
time: 0ms
memory: 1620kb

input:

5 5

output:

3

result:

ok single line: '3'

Test #4:

score: 0
Accepted
time: 0ms
memory: 1600kb

input:

4 4

output:

3

result:

ok single line: '3'

Test #5:

score: 0
Accepted
time: 0ms
memory: 1540kb

input:

3 4

output:

1

result:

ok single line: '1'

Test #6:

score: 0
Accepted
time: 0ms
memory: 1640kb

input:

8 12

output:

5

result:

ok single line: '5'

Test #7:

score: -100
Wrong Answer
time: 0ms
memory: 1592kb

input:

12 8

output:

7

result:

wrong answer 1st lines differ - expected: '5', found: '7'