結果
問題 | No.2535 多重同値 |
ユーザー |
|
提出日時 | 2023-11-10 21:42:51 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 666 bytes |
コンパイル時間 | 1,978 ms |
コンパイル使用メモリ | 170,240 KB |
実行使用メモリ | 7,424 KB |
最終ジャッジ日時 | 2024-09-26 01:19:32 |
合計ジャッジ時間 | 3,039 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
import std;void main () {int N = readln.chomp.to!int;string[] P = new string[](N);foreach (i; 0..N) P[i] = readln.chomp;// 定義を勘違いしていた。前から決めていける。(はず)string[] ans = new string[](N);foreach (i; 0..N) {if (i == 0) {ans[i] = P[i];continue;}if (P[i] == ans[i-1]) {ans[i] = "Yes";} else {ans[i] = "No";}}foreach (i; 0..N) writeln(ans[i]);}void read(T...)(string S, ref T args) {auto buf = S.split;foreach (i, ref arg; args) {arg = buf[i].to!(typeof(arg));}}