CF 141A求帮忙debug

21 views
Skip to first unread message

郭甲一

unread,
Jan 1, 2019, 2:04:14 AM1/1/19
to cs10...@googlegroups.com

求助,不知道为什么这个程序在这组数据时会输出YES,非常感谢! 

http://codeforces.com/contest/141/problem/A

赵雪羚

unread,
Jan 1, 2019, 4:00:50 AM1/1/19
to cs10...@googlegroups.com

我看了一下你的代码,我觉得问题应该也只能出在for循环那一部分,但看了很久也不知道bug在哪里orz

不过提供一种更简单的思路吧,以下是我AC的代码:

l1=list(input())

l1=l1+list(input())
l2=list(input())
l1.sort()
l2.sort()

if l1==l2:
    print('YES')
else:
    print('NO')




赵雪羚 1600015496

















-----原始邮件-----
发件人:"郭甲一" <pku...@pku.edu.cn>
发送时间:2019-01-01 15:04:07 (星期二)
收件人: cs10...@googlegroups.com
抄送:
主题: CF 141A求帮忙debug


求助,不知道为什么这个程序在这组数据时会输出YES,非常感谢! 

http://codeforces.com/contest/141/problem/A


--
您收到此邮件是因为您订阅了Google网上论坛上的“cs101pku”群组。
要退订此群组并停止接收此群组的电子邮件,请发送电子邮件到cs101pku+u...@googlegroups.com
要发帖到此群组,请发送电子邮件至cs10...@googlegroups.com
访问此群组:https://groups.google.com/group/cs101pku
要查看更多选项,请访问https://groups.google.com/d/optout
Reply all
Reply to author
Forward
0 new messages