답안 #755610

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
755610 2023-06-10T12:11:11 Z DJeniUp Costinland (info1cup19_costinland) C++17
0 / 100
1 ms 340 KB
#include "bits/stdc++.h"
#pragma GCC optimize("Ofast")
#pragma GCC optimize("O3")
 
using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll>pairll;
typedef pair<ll,ull>pairull;
typedef pair<ll,pairll>pair3l;
typedef long double ld;
typedef pair<ld,ll>pairld;
 
#define fr first
#define sc second
#define pb push_back
#define endl '\n'
#define N 100007
//#define MOD 998244353
#define INF 10000000000007
#define eps 0.0000000001
 
ll n,m,k,d[107][107];

int main(){
    
    cin>>k;
    n=2;
    ll x=2;
    while(x*2<=k){
        x*=2;
        n++;
    }
    x=1;
    for(int i=1;i<n;i++){
        if((k&x)!=0){
            d[i][i+1]=3;
        }else d[i][i+1]=1;
        d[i+1][i]=2;
        x*=2;
        
        d[i][n]=1;
        d[n][i]=2;
        d[i][i]=3;
    }
    cout<<n<<" "<<n<<endl;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=n;j++){
            if(d[i][j]==1)cout<<"d";
            else if(d[i][j]==2)cout<<"r";
            else if(d[i][j]==3)cout<<"X";
            else cout<<".";
        }
        cout<<endl;
    }
 
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB The matrix does not generate the required number of Costins
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Partially correct 1 ms 340 KB Partially Correct! Your size: 59
2 Partially correct 1 ms 340 KB Partially Correct! Your size: 59
3 Partially correct 1 ms 340 KB Partially Correct! Your size: 60
4 Partially correct 1 ms 340 KB Partially Correct! Your size: 60
5 Partially correct 1 ms 340 KB Partially Correct! Your size: 60
6 Incorrect 1 ms 340 KB The matrix does not generate the required number of Costins
7 Halted 0 ms 0 KB -