結果
| 問題 |
No.1942 Leading zero
|
| コンテスト | |
| ユーザー |
ramia777
|
| 提出日時 | 2022-05-27 17:32:23 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 15 ms / 2,000 ms |
| コード長 | 1,354 bytes |
| コンパイル時間 | 875 ms |
| コンパイル使用メモリ | 91,272 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-20 15:18:36 |
| 合計ジャッジ時間 | 1,081 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 1 |
ソースコード
// yukicodr
//No.1942
// Leading zero
//二次元可変配列
//vector <vector <int>> mass;
//vector <vector <int>> memo;
//vector <int> memo;
//#include "stdafx.h"
#include <iostream>
#include <vector>
#include <list>//list
#include <set> //tree
#include <map> //連想配列
#include <unordered_set> //hash
#include <unordered_map> //hash
#include <algorithm>
#include <iomanip>
#include <cstring>
//#include <bits/stdc++.h>
using namespace std;
#define FOR(x,to) for(x=0;x<to;x++)
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
typedef unsigned long long ULL;
typedef signed long long SLL;
//昇順
int compare_up(const int * a, const int *b)
{
if (*a > *b)
return (1);
else if (*a < *b)
return (-1);
return (0);
}
//降順
int compare_down(const int * a, const int *b)
{
if (*a > *b)
return (-1);
else if (*a < *b)
return (1);
return (0);
}
int solve(int i, ULL index_flag)
{
return 0;
}
int N;
char s[10005][5];
int main()
{
cin >> N;
for (int i = 0; i < N; i++)
{
cin >> s[i][0];
cin >> s[i][1];
cin >> s[i][2];
cin >> s[i][3];
cin >> s[i][4];
}
int OK;
for (int i = 0; i < N; i++)
{
OK = 0;
for (int j = 0; j < 5; j++)
{
if (s[i][j] != '0' || OK || j == 4)
{
cout << s[i][j];
OK = 1;
}
}
cout << endl;
}
//getchar();
return 0;
}
ramia777