1 solutions
-
0
Pascal :
var a:array['a'..'z'] of char; i,n:longint; st:string[3]; ch:char; f:boolean; begin for ch:='a' to 'z' do a[ch]:=' '; a['a']:='a'; readln(n); for i:=1 to n do begin readln(st); a[st[1]]:=a[st[3]]; end; f:=false; for ch:='a' to 'z' do if a[ch]='a' then begin write(ch); f:=true; end; if f then writeln else writeln('none'); end.
Information
- ID
- 800
- Time
- 1000ms
- Memory
- 32MiB
- Difficulty
- 10
- Tags
- # Submissions
- 8
- Accepted
- 0
- Uploaded By