Submission #1368432


Source Code Expand

#include<stdio.h>
#include<assert.h>
#include<vector>
#include<string.h>
#include<algorithm>
#include<memory.h>
#include<cmath>
#include<string>
#include<iostream>
#include<set>
#include<unordered_set>
#include<map>
#include<queue>
#include<functional>
#include<list>

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<double, double> pdd;
typedef tuple<int,int,int> t3;

const int MX = 500005;
const int MM = 1000000007;

int mn[MX], mx[MX];

int main()
{
	ll N, M;
	scanf("%lld%lld", &N, &M);
	ll s = 0, e = 1e12, m;
	while(s <= e){
		m = (s+e) / 2;
		if( m <= M && m*4 <= N*2+M ) s = m+1;
		else e = m-1;
	}swap(s, e);
	printf("%lld\n", s);
}

Submission Info

Submission Time
Task C - Scc Puzzle
User zigui
Language C++14 (GCC 5.4.1)
Score 0
Code Size 746 Byte
Status WA
Exec Time 1 ms
Memory 256 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:33:27: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld%lld", &N, &M);
                           ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
AC × 5
WA × 4
Set Name Test Cases
Sample 00_example_01.txt, 00_example_02.txt
All 00_example_01.txt, 00_example_02.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt
Case Name Status Exec Time Memory
00_example_01.txt AC 1 ms 256 KB
00_example_02.txt AC 1 ms 256 KB
01.txt WA 1 ms 256 KB
02.txt AC 1 ms 256 KB
03.txt WA 1 ms 256 KB
04.txt WA 1 ms 256 KB
05.txt WA 1 ms 256 KB
06.txt AC 1 ms 256 KB
07.txt AC 1 ms 256 KB