(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

제출 #483672

#제출 시각아이디문제언어결과실행 시간메모리
483672CaroLindaHop (COCI21_hop)C++14
110 / 110
39 ms1308 KiB
#include <bits/stdc++.h> #define mkt make_tuple #define all(x) x.begin(),x.end() #define sz(x) (int)(x.size()) #define ll long long #define lp(i,a,b) for(int i = a ; i < b ; i++ ) #define pii pair<int,int> #define mk make_pair #define pb push_back const int MAX= 1010 ; const int MAX_PRIMES = 664589 ; using namespace std ; int N ; ll X[MAX]; int getIndex(ll a , ll b ) { int ak = 63-__builtin_clzll(a) ; int bk = 63 - __builtin_clzll(b) ; if((ak/4) == (bk/4)) return 1 ; if( (ak/16) == (bk/16) ) return 2 ; return 3 ; } int main() { scanf("%d", &N ); for(int i = 1 ; i <= N ; i++ ) scanf("%lld", &X[i] ) ; for(int i = 2 ; i <= N ; i++,printf("\n") ) for(int j = 1 ; j < i ; j++ ) printf("%d " , getIndex(X[j],X[i]) ) ; }

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

Main.cpp: In function 'int main()':
Main.cpp:33:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   33 |  scanf("%d", &N  );
      |  ~~~~~^~~~~~~~~~~~
Main.cpp:34:38: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   34 |  for(int i = 1 ; i <= N ; i++ ) scanf("%lld", &X[i] ) ;
      |                                 ~~~~~^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...