Section 1.1 Your Ride Is Here
来源:互联网 发布:gy手机自动关机软件 编辑:程序博客网 时间:2024/06/06 06:37
模拟
{
ID: yaoyuan4
PROG: ride
LANG: PASCAL
}
Program ride;
const
yes = 'GO';
no = 'STAY';
inf = 'ride.in';
outf = 'ride.out';
var
flag : boolean;
x, y : string;
a : array['A'..'Z'] of longint;
Procedure init;
var
i : char;
begin
assign(input, inf); reset(input);
flag := false;
for i := 'A' to 'Z' do
a[i] := ord(i) - ord('A') + 1;
readln(x);
readln(y);
close(input);
end;
Procedure orz(s : string; var t : longint);
var
l, i : longint;
begin
t := 1;
l := length(s);
for i := 1 to l do
t := t * a[s[i]];
t := t mod 47;
end;
Procedure work;
var
s1, s2 : longint;
begin
orz(x, s1);
orz(y, s2);
if s1 = s2 then flag := true;
end;
Procedure print;
begin
assign(output, outf); rewrite(output);
if flag then writeln(yes) else writeln(no);
close(output);
end;
begin
init;
work;
print;
end.
- USACO:Section 1.1 Your Ride Is Here
- Section 1.1 Your Ride Is Here
- USACO Section 1.1 Your Ride Is Here
- USACO Section 1.1 Your Ride Is Here
- USACO Section 1.1 Your Ride Is Here
- Section 1.1 Your Ride Is Here
- Section 1.1 PROB Your Ride Is Here
- [Section 1.1] Your Ride Is Here
- Section 1.1 PROB Your Ride Is Here
- USACO Section 1.1 Your Ride Is Here
- Section 1.1 Your Ride Is Here
- Analysis: Section 1.1.1 Your Ride Is Here
- USACO Section 1.1.1 Your Ride Is Here
- USACO section 1.1.1 Your Ride Is Here
- USACO Section 1.1 PROB Your Ride Is Here
- usaco Section 1.0 Your Ride Is Here
- USACO 1.1 Your Ride Is Here (ride)
- USACO1.1.1 Your Ride Is Here (ride)
- java 读取html写入excel (htmlpaser,jxl)
- java实现手机发送信息(实例) xzhou
- jqGrid属性中文详细说明
- Axis2 错误:An error occurred while completing process -java.lang.reflect.InvocationTargetException
- 多工具条编程秘技
- Section 1.1 Your Ride Is Here
- hadoop分布式集群的搭建
- mc9s12dg128使用定时器的输出比较产生定时中断代码亮1S灭1S
- java jtree 树行结构
- Java的反射机制
- 正则表达式集锦--未完待续
- Windows下Critical Section、Event、Mutex、Semaphores区别(ZZ)
- 妞,你给爷听好了...
- ORACLE卸载问题