結果
| 問題 |
No.494 yukicoder
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-07 09:06:19 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 747 bytes |
| コンパイル時間 | 646 ms |
| コンパイル使用メモリ | 98,092 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-12 23:21:15 |
| 合計ジャッジ時間 | 1,143 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 |
ソースコード
import std.stdio : writeln, writefln, readln;
import std.range.primitives;
void main() {
import std.algorithm : mismatch;
auto s = "yukicoder";
string t;
scan(t);
mismatch(s,t)[0].front.writeln;
}
void scan(T...)(ref T args) {
import std.stdio : readln;
import std.array : split;
import std.conv : to;
import std.range.primitives;
string[] line = readln.split;
foreach (ref arg; args) {
arg = line.front.to!(typeof(arg));
line.popFront();
}
assert(line.empty);
}
void fillAll(R, T)(ref R arr, T value) {
static if (is(typeof(arr[] = value))) {
arr[] = value;
}
else {
foreach (ref e; arr) {
fillAll(e, value);
}
}
}