Submission #1070382


Source Code Expand

#include <iostream>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <fstream>
#include <numeric>
#include <iomanip>
#include <bitset>
#include <list>
#include <stdexcept>
#include <functional>
#include <utility>
#include <ctime>


typedef long double ld;
typedef long long ll;
using namespace std;
const ll MX=5e6+9;
const ld pi = acos(-1);
const ll mod = 1e8;

//bool cmp ( int a,int b ) { return a>b; }

ll po ( ll a , ll b )
{
    if ( b==0 ) { return 1; }
    ll x = po ( a , b/2 );
    x *= x%mod;
    if ( b%2 ) { x*=a%mod; }
    return x%mod;
}

ll gcd (  ll a , ll b )
{
    if ( b==0 ) return a;
    else { gcd( b , a%b ); }
}
bool cmp ( int a , int b ) { return (a>b); }
int dx[]={ 0 , 0 , -1 , 1 , 1 , -1 , -1 , 1 };
int dy[]={ 1 , -1 , 0 , 0 , 1 , -1 , 1 , -1 };
ll a[MX],b[MX],c[MX];
int n,m,l;


ll bs ( ll x , ll id )
{
    ll st,en,mid;
    if ( id==2 )
    {
        st=0,en=m;
    }
    else { st=0,en=l; }
    ll ans=0;
    if ( id==2 ){
    ans=m-1;
    while ( st<=en )
    {
        mid = st+(en-st)/2;
        if ( b[mid]>=x ) { ans=mid; en=mid-1; }
        else { st=mid+1; }
    }
    }
    else
    {
    ans=l-1;
    while ( st<=en )
    {
        mid = st+(en-st)/2;
        if ( c[mid]>=x ) { ans=mid; en=mid-1; }
        else { st=mid+1; }
    }
    }
    return ans;



}

int main()
{
    string s;
    cin>>s;
    string t;
    for ( int i=0 ; i<s.length() ; i++ )
    {

        if ( s[i]==',' ) { cout<<t<<" "; t.clear(); continue;}
        t += s[i];
    }

    cout<<t;


	return 0;
}

Submission Info

Submission Time
Task A - Haiku
User Reckt
Language C++14 (GCC 5.4.1)
Score 100
Code Size 1820 Byte
Status AC
Exec Time 3 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 7
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All subtask_1_01.txt, subtask_1_02.txt, subtask_1_03.txt, subtask_1_04.txt, subtask_1_05.txt, subtask_1_06.txt, subtask_1_07.txt
Case Name Status Exec Time Memory
sample_01.txt AC 3 ms 256 KB
sample_02.txt AC 2 ms 256 KB
sample_03.txt AC 2 ms 256 KB
subtask_1_01.txt AC 3 ms 256 KB
subtask_1_02.txt AC 3 ms 256 KB
subtask_1_03.txt AC 3 ms 256 KB
subtask_1_04.txt AC 2 ms 256 KB
subtask_1_05.txt AC 2 ms 256 KB
subtask_1_06.txt AC 3 ms 256 KB
subtask_1_07.txt AC 3 ms 256 KB