結果

問題 No.83 最大マッチング
ユーザー Tokuzoo
提出日時 2021-09-25 18:03:54
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 669 ms / 5,000 ms
コード長 577 bytes
コンパイル時間 1,420 ms
コンパイル使用メモリ 165,668 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-05 12:09:59
合計ジャッジ時間 12,023 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const int INF = 1e+9;
const ll LINF = (ll)pow(10,18);

int main(){
    int n;
    cin >> n;

    int anslen, sevencount;
    anslen = 0; sevencount = 0;

    for(int i=1; i<=50000; i++){
        for(int j=0; j<=i; j++){
            if(j * 3 + (i - j) * 2 <= n){
                anslen = i;
                sevencount = j;
            }
        }
    }

    for(int i=0; i<anslen; i++){
        if(i < sevencount) cout << 7;
        else cout << 1;
    }

    cout << "\n";
}
0