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
void modifica(int x) { | |
x = x + 3; | |
} | |
int main() { | |
int x = 5; | |
cout << x << '\n'; // 5 | |
modifica(x); | |
cout << x << '\n'; // 5 |
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 main() { | |
int x = 42; | |
cout << x << '\n'; // 42 | |
// Declaramos um ponteiro que aponta para um inteiro | |
// Para declarar um ponteiro usamos o * do lado do tipo da variável | |
int* p = &x; | |
// Também usando o * é possível acessar o valor que | |
// está na posição que o ponteiro aponta. |
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 main() { | |
int x; | |
// Imprime a posição na memória que | |
// a variável x está localizada | |
cout << &x << '\n'; // 0x7ffd22810b84 | |
// O valor muda sempre que o programa é reiniciado, pois a | |
// variavél é colocada em uma posição diferente na memória. | |
return 0; |
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
From 2e6c09838f88803f31d229002715628639631897 Mon Sep 17 00:00:00 2001 | |
From: Brian Shu <[email protected]> | |
Date: Wed, 17 Mar 2021 17:44:18 -0400 | |
Subject: [PATCH] lsp: fix blocking in closing of clients | |
--- | |
runtime/lua/vim/lsp.lua | 33 ++++++++++++++++++++++++++++++--- | |
1 file changed, 30 insertions(+), 3 deletions(-) | |
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua |
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; | |
int v[maxn]; | |
multiset<int> cc; | |
multiset<int>::iterator median; | |
void insert(int x) { | |
if (cc.empty()) { |
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 <iostream> // cin e cout | |
using namespace std; // para conseguir utilizar o cin/cout | |
int main() { | |
int frequencia_repouso; // Frequencia cardiaca em repouso | |
int frequencia_atual; // Frequencia cardiaca atual | |
int capacidade_oxigenacao; // Capacidade de oxigenação atual | |
cin >> frequencia_repouso >> frequencia_atual >> capacidade_oxigenacao; // Lendo a entrada |
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
using namespace std; | |
const int maxn = 1e5 + 10; | |
int v[maxn], n; | |
int32_t main() { | |
cin >> n; | |
for (int i = 1; i <= n; i++) | |
cin >> v[i]; |
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 = 110; | |
// declaro as variáveis que vou utilizar | |
int n, m, comp[maxn], mesa[maxn]; | |
vector<int> friends[maxn]; | |
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 main() { | |
int n; | |
cin >> n; | |
if (n >= 2 && n % 2 == 0) cout << "YES\n"; | |
else cout << "NO\n"; | |
return 0; |
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, maxv = 1e5 + 10; | |
int a[maxn], b[maxn]; | |
int v[maxn], x[maxn], freq[maxn]; | |
int main() { | |
ios::sync_with_stdio(false), cin.tie(0); | |
int n, resp = 0; |