记录详情

Time Exceeded


  
# 状态 耗时 内存占用
#1 Accepted 1ms 128.0 KiB
#2 Time Exceeded ≥1002ms ≥128.0 KiB
#3 Accepted 1ms 212.0 KiB
#4 Accepted 1ms 220.0 KiB
#5 Time Exceeded ≥1001ms ≥212.0 KiB
#6 Time Exceeded ≥1002ms ≥208.0 KiB
#7 Time Exceeded ≥1000ms ≥216.0 KiB
#8 Time Exceeded ≥1002ms ≥216.0 KiB
#9 Time Exceeded ≥1000ms ≥128.0 KiB
#10 Time Exceeded ≥1001ms ≥208.0 KiB

代码

#include<stdio.h>
#include<string.h>
#include<math.h>
int main(){
  int n,a,b,c,sum=0,yi=0;
  scanf("%d",&n);
  for(a=1;a<=n/3;a++){
  	for(c=a;c<=n/2;c++){
  		for(b=a;b<=c;b++){
  			if(a<=b&&b<=c&&a*a+b*b==c*c+1&&a+b+c<=n){
  				if(sum==0)yi=(a+b)^c;
  				else yi=yi^(a+b)^c;
				  sum++;
			  }
		  }
	  }
  }
printf("%d %d",sum,yi);
return 0;
}

信息

递交者
类型
递交
题目
P1003 hitwh 2019 新生赛 D Songer 的排兵布阵
语言
C
递交时间
2020-12-17 19:05:09
评测时间
2020-12-17 19:05:09
评测机
分数
30
总耗时
≥7015ms
峰值内存
≥220.0 KiB