hihoCoder Challenge 10 register

Ended

Participants:522

Verdict:Accepted
Submitted:2015-04-12 20:29:02

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <string>
using namespace std;
//class Solution {
//public:
//
//
//private:
//
//};
int main(int argc, char *argv[]){
    //Solution s;
    int n, m;
    cin >> n >> m;
    if (m == 0){
        string str(n, '0');
        cout << str;
    }
    else if (m == 1){
        if (n <= 1){
            string str(n, '0');
            cout << str + "1";
        }
        else{
            string str(n - 1, '0');
            cout << "01" + str;
        }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX