Submission #9600399


Source Code Expand

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define VSORT(v) sort(v.begin(), v.end())
#define VRSORT(v) sort(v.rbegin(), v.rend())
#define ll long long
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;
//typedef vector<unsigned int>vec;
//typedef vector<ll>vec;
//typedef vector<vec> mat;
typedef vector<vector<int>> Graph;

const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const int INF = 1000000000;
const ll LINF = 1000000000000000000;//1e18
const ll  MOD = 1000000007;
const double PI = acos(-1.0);
const double EPS = 1e-10;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline void add(T &a, T b){a = ((a+b) % MOD + MOD) % MOD;};


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b;
    cin >> a >> b;
    string S, T;
    REP(i, b) S += a + '0';
    REP(i, a) T += b + '0';
    if(S < T) cout << S << endl;
    else cout << T << endl;
}

Submission Info

Submission Time
Task B - Comparing Strings
User Bondo416
Language C++14 (GCC 5.4.1)
Score 200
Code Size 1219 Byte
Status AC
Exec Time 1 ms
Memory 256 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 6
Set Name Test Cases
Sample 01.txt, 02.txt
All 01.txt, 02.txt, 10.txt, 11.txt, 12.txt, 13.txt
Case Name Status Exec Time Memory
01.txt AC 1 ms 256 KiB
02.txt AC 1 ms 256 KiB
10.txt AC 1 ms 256 KiB
11.txt AC 1 ms 256 KiB
12.txt AC 1 ms 256 KiB
13.txt AC 1 ms 256 KiB