Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int nPed, nSap, i, j;
- scanf("%d %d", &nPed, &nSap);
- int Sapo[nSap][2];
- for(i = 0; i < nSap; i++) scanf("%d %d", &Sapo[i][0], &Sapo[i][1]);
- for(i = 1; i <= nPed; i++) {
- int OK = 0;
- for(j = 0; j < nSap; j++) {
- int Pos=Sapo[j][0], Salto=Sapo[j][1];
- if((Pos-i) % Salto == 0) OK = 1;
- }
- printf("%d\n", OK);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement