Last active
June 9, 2016 21:50
-
-
Save rogerioagjr/9a13e84dfca18e1d88af43e7ae00dd89 to your computer and use it in GitHub Desktop.
Exemplo 2 - 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
int j=1; | |
for(int i=1;i<=n;i++) | |
while(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