Last active
June 9, 2016 21:42
-
-
Save rogerioagjr/3739042e929ba6417214578f689964c7 to your computer and use it in GitHub Desktop.
Exemplo 1 - Sanduíche
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(int i=1;i<=n;i++) | |
for(int j=i;j<2*n && prefix[j+1]-prefix[i-1]<=d){ | |
j++; | |
if(prefix[j]-prefix[i-1]==d) resp++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment