Warning: session_start(): open(/tmp/sess_476e0afbcd2eee5e864b62d2b78bd868, O_RDWR) failed: No space left on device (28) in /data/wiki/inc/init.php on line 239
Warning: session_start(): Failed to read session data: files (path: ) in /data/wiki/inc/init.php on line 239
Warning: Cannot modify header information - headers already sent by (output started at /data/wiki/inc/init.php:239) in /data/wiki/inc/auth.php on line 430
Writing /data/wiki/data/cache/d/de2edb2fcb553ea79b79c722a4e13dbc.captchaip failed
Warning: Cannot modify header information - headers already sent by (output started at /data/wiki/inc/init.php:239) in /data/wiki/inc/Action/Export.php on line 103
Warning: Cannot modify header information - headers already sent by (output started at /data/wiki/inc/init.php:239) in /data/wiki/inc/Action/Export.php on line 103
Warning: Cannot modify header information - headers already sent by (output started at /data/wiki/inc/init.php:239) in /data/wiki/inc/Action/Export.php on line 103
[[http://poj.org/problem?id=3280|POJ 3280]]
#include
#include
#include
#include
#include
using namespace std;
int n,m,ad[26],de[26],f[2005][2005];
char s[2005];
int main()
{
while(~scanf("%d%d",&n,&m))
{
scanf("%s",s);
for(int i=1;i<=n;i++)
{
char c;
scanf(" %c",&c);
scanf("%d%d",&ad[c-'a'],&de[c-'a']);
}
for(int k=1;k<=m;k++)
{
for(int i=0;i