Submission #1218838


Source Code Expand

#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<stdlib.h>
#include<cassert>
using namespace std;
const long long mod=1000000007;
const long long inf=mod*mod;
const long long d2=500000004;
// 104, 79, 118, 87
// 169, 133, 17, 98
// 180, 106, 125, 39
// 171, 42, 159, 14
// 45, 76, 101, 56
int main(){
	int a,b,c,d;
	scanf("%d%d%d%d",&a,&b,&c,&d);
	long long ret=0;
	long long ks=1;
	long long ret2=0;
	for(int i=0;i<a;i++)for(int j=0;j<a;j++){
		printf("? %d %d %d %d\n",i,j,i,j);
		fflush(stdout);
		int t;
		scanf("%d",&t);
		if(t)ret=(ret+ks)%d;
		if(i==0)ret2=(ret2+ks)%d;
		ks=ks*2%d;
	}
	int sz=d%200;
	char *p = new char[sz*1000000];
	for(int i=0;i<sz*1000000;i++)p[i]='e';
	printf("! %lld\n",ret);
}

Submission Info

Submission Time
Task H - Bombs Searching Game
User tozangezan
Language C++14 (GCC 5.4.1)
Score 200
Code Size 875 Byte
Status AC
Exec Time 171 ms
Memory 122708 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:24:31: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d%d%d",&a,&b,&c,&d);
                               ^
./Main.cpp:32:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&t);
                 ^

Judge Result

Set Name Text1 Text2 Text3 Text4 Text5
Score / Max Score 40 / 300 40 / 300 40 / 300 40 / 300 40 / 300
Status
AC × 1
AC × 1
AC × 1
AC × 1
AC × 1
Set Name Test Cases
Text1 in1.txt
Text2 in2.txt
Text3 in3.txt
Text4 in4.txt
Text5 in5.txt
Case Name Status Exec Time Memory
in1.txt AC 137 ms 69972 KB
in2.txt AC 136 ms 63188 KB
in3.txt AC 171 ms 122708 KB
in4.txt AC 156 ms 97360 KB
in5.txt AC 157 ms 99284 KB