Submission #1647754


Source Code Expand

//#define __USE_MINGW_ANSI_STDIO 0
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
// #define int ll
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define IN(a, b, x) (a<=x&&x<b)
#define MP make_pair
#define PB push_back
#ifdef int
const int INF = (1LL<<30);
#else
const ll INF = (1LL<<60);
#endif
const double PI = 3.14159265359;
const double EPS = 1e-12;
const int MOD = 1000000007;

template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }

int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};

signed main(void)
{
  string s;
  getline(cin, s);

  string ans = "";
  bool flag = false;
  for(char c: s) {
    if(c == ' ') {
      flag = true;
    }
    if(flag && c != ' ') {
      ans += ',';
      flag = false;
    }
    if(!flag) ans += c;
  }
  cout << ans << endl;

  return 0;
}

Submission Info

Submission Time
Task B - 分類たん
User ferin_tech
Language C++14 (GCC 5.4.1)
Score 100
Code Size 1151 Byte
Status AC
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 43
Set Name Test Cases
All 00_sample1, 00_sample2, 00_sample3, 10_random00, 10_random01, 10_random02, 10_random03, 10_random04, 10_random05, 10_random06, 10_random07, 10_random08, 10_random09, 10_random10, 10_random11, 10_random12, 10_random13, 10_random14, 10_random15, 10_random16, 10_random17, 10_random18, 10_random19, 10_random20, 10_random21, 10_random22, 10_random23, 10_random24, 10_random25, 10_random26, 10_random27, 10_random28, 10_random29, 10_random30, 10_random31, 10_random32, 10_random33, 10_random34, 10_random35, 10_random36, 10_random37, 10_random38, 10_random39
Case Name Status Exec Time Memory
00_sample1 AC 1 ms 256 KB
00_sample2 AC 1 ms 256 KB
00_sample3 AC 1 ms 256 KB
10_random00 AC 1 ms 256 KB
10_random01 AC 1 ms 256 KB
10_random02 AC 1 ms 256 KB
10_random03 AC 1 ms 256 KB
10_random04 AC 1 ms 256 KB
10_random05 AC 1 ms 256 KB
10_random06 AC 1 ms 256 KB
10_random07 AC 1 ms 256 KB
10_random08 AC 1 ms 256 KB
10_random09 AC 1 ms 256 KB
10_random10 AC 1 ms 256 KB
10_random11 AC 1 ms 256 KB
10_random12 AC 1 ms 256 KB
10_random13 AC 1 ms 256 KB
10_random14 AC 1 ms 256 KB
10_random15 AC 1 ms 256 KB
10_random16 AC 1 ms 256 KB
10_random17 AC 1 ms 256 KB
10_random18 AC 1 ms 256 KB
10_random19 AC 1 ms 256 KB
10_random20 AC 1 ms 256 KB
10_random21 AC 1 ms 256 KB
10_random22 AC 1 ms 256 KB
10_random23 AC 1 ms 256 KB
10_random24 AC 1 ms 256 KB
10_random25 AC 1 ms 256 KB
10_random26 AC 1 ms 256 KB
10_random27 AC 1 ms 256 KB
10_random28 AC 1 ms 256 KB
10_random29 AC 1 ms 256 KB
10_random30 AC 1 ms 256 KB
10_random31 AC 1 ms 256 KB
10_random32 AC 1 ms 256 KB
10_random33 AC 1 ms 256 KB
10_random34 AC 1 ms 256 KB
10_random35 AC 1 ms 256 KB
10_random36 AC 1 ms 256 KB
10_random37 AC 1 ms 256 KB
10_random38 AC 1 ms 256 KB
10_random39 AC 1 ms 256 KB