제출 #1139195

#제출 시각아이디문제언어결과실행 시간메모리
1139195KasymKBinary Subsequences (info1cup17_binary)C++20
0.11 / 100
0 ms328 KiB
#include "bits/stdc++.h"
using namespace std;
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
#define ll long long
#define pb push_back
#define pii pair<int, int>
#define pli pair<ll, int>
#define pll pair<ll, ll>
#define tr(i, c) for(auto i = c.begin(); i != c.end(); ++i)
#define wr puts("----------------")
template<class T>bool umin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T>bool umax(T& a,T b){if(a<b){a=b;return 1;}return 0;}

int main(){
	int tt;
	scanf("%d", &tt);
	int op=1;
	while(tt--){
		int k;
		scanf("%d", &k);
		if(op==1)
			printf("2\n0\n");
		else if(op==2)
			printf("2\n0 0\n");
		else if(op==3)
			printf("4\n1 0\n");
		else if(op==6)
			printf("-1\n1 0 1\n");
		else if(op==8)
			printf("-1\n1 1 0 0\n");
		else if(op==19)
			printf("-1\n1 0 1 0 1\n");
		else
			printf("-1\n-1\n");
		op++;
	}
	return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

binary.cpp: In function 'int main()':
binary.cpp:18:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   18 |         scanf("%d", &tt);
      |         ~~~~~^~~~~~~~~~~
binary.cpp:22:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   22 |                 scanf("%d", &k);
      |                 ~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...