std :: ios_base :: sync_with_stdio (0 ) ;
//...
std :: cin >> a [ i ] ;
2. Accepted in 0.187scanf ( "%d" , &a [ i ] ) ;
3. Accepted in 0.109int nextInt ( ) {
int res = 0, c = getchar ( ) ;
while ( c < '0' || c > '9' ) c = getchar ( ) ;
while ( c >= '0' && c <= '9' ) {
res = res * 10 + c - '0' ;
c = getchar ( ) ;
}
return res ;
}
//...
a [ i ] = nextInt ( ) ;
4. Accepted in 0.098a [ i ] = 0 0 ;
c = getchar ( ) ;
while ( c < '0' || c > '9' ) c = getchar ( ) ;
while ( c >= '0' && c <= '9' ) {
a [ i ] = a [ i ] * 10 + c - '0' ;
c = getchar ( ) ;
}
for ( int i = 0 ; i < n ; i ++ ) {
// array[i]
}
2. Acceptedfor ( int i = 0 ; i < n ; i ++ ) {
double x = array [ i ] ;
// x
}
Perhaps these observations can help someone. For example, they helped me :)Source: https://habr.com/ru/post/71601/
All Articles