제출 #1303188

#제출 시각아이디문제언어결과실행 시간메모리
1303188SmuggingSpunHop (COCI21_hop)C++20
110 / 110
23 ms1368 KiB
#include<bits/stdc++.h>
#define taskname "D"
using namespace std;
typedef long long ll;
int main(){
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	if(fopen(taskname".inp", "r")){
		freopen(taskname".inp", "r", stdin);
	}
	int n;
	cin >> n;
	vector<int>a(n);
	for(int i = 0; i < n; i++){
		ll x;
		cin >> x;
		a[i] = 63 - __builtin_clzll(x);
	}
	for(int i = 1; i < n; i++){
		for(int j = 0; j < i; j++){
			cout << (a[i] / 4 == a[j] / 4 ? 1 : (a[i] / 16 == a[j] / 16 ? 2 : 3)) << " ";
		}
		cout << "\n";
	}
}

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

Main.cpp: In function 'int main()':
Main.cpp:8:24: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |                 freopen(taskname".inp", "r", stdin);
      |                 ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...