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
#include<bits/stdc++.h> | |
using namespace std; | |
const int MAXN = 1e5 + 10; | |
typedef long long ll; | |
int bit[MAXN]; | |
int T; | |
void update(int idx, ll val){ | |
while(idx <= T){ |
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
#include<bits/stdc++.h> | |
using namespace std; | |
const int MAXN = 1e5 + 10; | |
typedef long long ll; | |
int bit[MAXN]; | |
int T; | |
void update(int idx, ll val){ | |
bool ans = 0; | |
if(idx >= T)ans = 1; |
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
#include<bits/stdc++.h> | |
using namespace std; | |
const int MAXN = 2e5 + 10; | |
typedef long long ll; | |
const ll INF = 1e18; | |
ll dist[MAXN]; | |
int deonde[MAXN]; | |
//Guardamos os caminhos e caminhões na mesma estrutura |
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
#include <bits/stdc++.h> | |
using namespace std; | |
const int INF = 1e9 + 7; | |
// usaremos o INF como um indicador que ainda não calculamos | |
// o estado. Note que não podemos usar artificios como -1 | |
// pois a recursão aceita valores negativos | |
int A[212][212], pref[212][212]; | |
int H[212][212], V[212][212]; | |
int n, m; |
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
#include <bits/stdc++.h> | |
using namespace std; | |
const int INF = 1e9 + 7; // usaremos o INF como um indicador que ainda não calculamos | |
// o estado. Note que não podemos usar artificios como -1 | |
// pois a recursão aceita valores negativos | |
int A[212][212], pref[212][212]; | |
int H[212][212], V[212][212]; | |
int n, m; | |
int dp_ida[212][212]; |
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
#include <bits/stdc++.h> | |
using namespace std; | |
const int INF = 1e9 + 7; // usaremos o INF como um indicador que ainda não calculamos | |
// o estado. Note que não podemos usar artificios como -1 | |
// pois a recursão aceita valores negativos | |
int A[212][212], pref[212][212]; | |
int H[212][212], V[212][212]; | |
int n, m; | |
int dp_ida[212][212]; |
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
#include <bits/stdc++.h> | |
using namespace std; | |
const int INF = 1e9 + 7; // usaremos o INF como um indicador que ainda não calculamos | |
// o estado. Note que não podemos usar artificios como -1 | |
// pois a recursão aceita valores negativos | |
int A[212][212], pref[212][212]; | |
int H[212][212], V[212][212]; | |
int n, m; | |
int dp_ida[212][212]; |
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
#include <bits/stdc++.h> | |
using namespace std; | |
const int INF = 1e9 + 7; // usaremos o INF como um indicador que ainda não calculamos | |
// o estado. Note que não podemos usar artificios como -1 | |
// pois a recursão aceita valores negativos | |
int A[212][212], pref[212][212]; | |
int H[212][212], V[212][212]; | |
int n, m; | |
int dp_ida[212][212]; |
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
#include<bits/stdc++.h> | |
using namespace std; | |
int orig[512][512]; //matriz original, dada na entrada. | |
int dx[5] = {1, 0, -1, 0}; | |
int dy[5] = {0, 1, 0, -1}; //vetores de auxílio, que servirão como | |
//arestas no grafo. | |
int n, f; |
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
#include<bits/stdc++.h> | |
using namespace std; | |
int marc[1123]; // o vetor de marcação | |
vector<int> reuniao[1123]; | |
int n, m, I, R; | |
int main(){ | |
scanf("%d %d", &n, &m); | |
scanf("%d %d", &I, &R); |