编译错误非常疑惑......
  • 板块P1161 开灯
  • 楼主L__B
  • 当前回复5
  • 已保存回复5
  • 发布时间2023/11/4 19:26
  • 上次更新2023/11/4 21:27:38
查看原帖
编译错误非常疑惑......
995569
L__B楼主2023/11/4 19:26
#include<bits/stdc++.h>
using namespace std;
int n,t,s; double a; bool f[2000001];
int main(){
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%lf%d",&a,&t);
        for(int j=1;j<=t;j++) f[a*j]^=1;
    }
    for(int i=1;i<=n;i++)
      if(f[i]) s++;
    printf("%d",s);
    return 0;
}
2023/11/4 19:26
加载中...