結果

問題 No.3311 フィルター
コンテスト
ユーザー tails
提出日時 2025-10-25 00:05:57
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 490 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 28,152 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-10-25 12:57:55
合計ジャッジ時間 1,089 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:23:17: warning: implicit declaration of function ‘write’ [-Wimplicit-function-declaration]
   23 |                 write(1,"Yes",3);
      |                 ^~~~~
main.c:27:9: warning: implicit declaration of function ‘_exit’ [-Wimplicit-function-declaration]
   27 |         _exit(0);
      |         ^~~~~
main.c:27:9: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch]

ソースコード

diff #

#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")

#define rd_init() char*rp=({char*mmap();mmap(0l,1l<<25,1,2,0,0ll);})
#define rd() ({int _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;})
#define rep(v,e) for(typeof(e)v=0;v<e;++v)

int main(){
	rd_init();
	int n=rd();
	int m=rd();
	int a=0;
	rep(i,m){
		int b=~0;
		rep(j,n){
			b=b<<1|*rp++&1;
		}
		a|=~b;
		++rp;
	}
	int b=__builtin_popcount(a);
	if(1<<b==m&&b!=n){
		write(1,"Yes",3);
	}else{
		write(1,"No",2);
	}
	_exit(0);
}
0