Submission #1769131


Source Code Expand

#include<bits/stdc++.h>
#define N 105
using namespace std;

#define db double
#define eps 1e-8
struct point{db x,y;};
point operator +(point a,point b){return (point){a.x+b.x,a.y+b.y};}
point operator -(point a,point b){return (point){a.x-b.x,a.y-b.y};}
db operator *(point a,point b){return a.x*b.y-b.x*a.y;}
point operator *(point a,db x){return (point){a.x*x,a.y*x};}
point operator /(point a,db x){return (point){a.x/x,a.y/x};}
bool a_onleft(point a,point b){return a*b<-eps;}
db area(point a,point b,point c){return abs((a-c)*(b-c)/2.0);}
point inter(point a1,point a2,point b1,point b2){
	double s1=area(b1,b2,a1),s2=area(b1,b2,a2);
	return (a1-a2)/(s1+s2)*s2+a2;
}
#undef db
#undef eps
const int mod=998244353;
point p[N];
int n,pw[N];
int main(){
	scanf("%d",&n);pw[0]=1;
	for(int i=1;i<=n;i++) scanf("%lfq%lf",&p[i].x,&p[i].y),pw[i]=pw[i-1]*2%mod;
	long long ans=pw[n]-1-n;
	for(int i=1;i<=n;i++)
		for(int j=i+1;j<=n;j++){
			int cnt=0;
			for(int k=j+1;k<=n;k++)
				if(area(p[i],p[j],p[k])<1e-8) cnt++;
			ans-=pw[cnt];
		}
	cout<<(ans%mod+mod)%mod<<endl;
	return 0;
}

Submission Info

Submission Time
Task E - ConvexScore
User Wuvin
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1118 Byte
Status RE
Exec Time 101 ms
Memory 256 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:25:16: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);pw[0]=1;
                ^
./Main.cpp:26:76: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  for(int i=1;i<=n;i++) scanf("%lfq%lf",&p[i].x,&p[i].y),pw[i]=pw[i-1]*2%mod;
                                                                            ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 700
Status
AC × 1
WA × 2
AC × 2
WA × 6
RE × 28
Set Name Test Cases
Sample 0_000.txt, 0_001.txt, 0_002.txt
All 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt, 1_013.txt, 1_014.txt, 1_015.txt, 1_016.txt, 1_017.txt, 1_018.txt, 1_019.txt, 1_020.txt, 1_021.txt, 1_022.txt, 1_023.txt, 1_024.txt, 1_025.txt, 1_026.txt, 1_027.txt, 1_028.txt, 1_029.txt, 1_030.txt, 1_031.txt, 1_032.txt, 1_033.txt, 1_034.txt, 1_035.txt
Case Name Status Exec Time Memory
0_000.txt WA 1 ms 256 KB
0_001.txt WA 1 ms 256 KB
0_002.txt AC 1 ms 256 KB
1_003.txt AC 1 ms 256 KB
1_004.txt WA 1 ms 256 KB
1_005.txt RE 97 ms 256 KB
1_006.txt WA 1 ms 256 KB
1_007.txt RE 96 ms 256 KB
1_008.txt RE 97 ms 256 KB
1_009.txt RE 97 ms 256 KB
1_010.txt WA 2 ms 256 KB
1_011.txt RE 97 ms 256 KB
1_012.txt RE 97 ms 256 KB
1_013.txt RE 97 ms 256 KB
1_014.txt WA 1 ms 256 KB
1_015.txt RE 97 ms 256 KB
1_016.txt RE 97 ms 256 KB
1_017.txt RE 98 ms 256 KB
1_018.txt RE 97 ms 256 KB
1_019.txt RE 97 ms 256 KB
1_020.txt RE 101 ms 256 KB
1_021.txt RE 99 ms 256 KB
1_022.txt RE 99 ms 256 KB
1_023.txt RE 100 ms 256 KB
1_024.txt RE 99 ms 256 KB
1_025.txt RE 98 ms 256 KB
1_026.txt RE 97 ms 256 KB
1_027.txt RE 99 ms 256 KB
1_028.txt RE 97 ms 256 KB
1_029.txt RE 97 ms 256 KB
1_030.txt RE 97 ms 256 KB
1_031.txt RE 97 ms 256 KB
1_032.txt RE 97 ms 256 KB
1_033.txt RE 97 ms 256 KB
1_034.txt RE 98 ms 256 KB
1_035.txt RE 97 ms 256 KB