Submission #31911

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
319112017-09-14 09:40:24chonkaTracks in the Snow (BOI13_tracks)C++98
100 / 100
1493 ms104988 KiB
#include<iostream>
#include<stdio.h>
#include<string>
#include<queue>
using namespace std ;
#define MAXN 4007
int n , m ;
string a[ MAXN ] ;
int used[ MAXN ][ MAXN ] ;
int ans = 0 ;
int dx[ 4 ] = { 0 , 0 , 1 , -1 } ;
int dy[ 4 ] = { 1 , -1 , 0 , 0 } ;
void bfs ( ) {
queue < pair < int , int > > q ;
queue < pair < int , int > > aux ;
int i , j ;
used[ n ][ m ] = 1 ;
q.push ( make_pair ( n , m ) ) ;
while ( 1 ) {
ans ++ ;
while ( q.empty ( ) == false ) {
pair < int , int > p = q.front ( ) ;
q.pop ( ) ;
int i ;
for ( i = 0 ; i < 4 ; i ++ ) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

tracks.cpp: In function 'void bfs()':
tracks.cpp:21:9: warning: unused variable 'i' [-Wunused-variable]
     int i , j ;
         ^
tracks.cpp:21:13: warning: unused variable 'j' [-Wunused-variable]
     int i , j ;
             ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...