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
public class Main { | |
public static void main(String[] args) { | |
int[] msg = {73, 110, 32, 84, 104, 101, 32, 78, 101, 119, 32, 89, 101, 97, 114, 44, 10, 119, 101, 32, 119, 105, 115, 104, 32, 121, 111, 117, 32, 116, 104, 101, 32, 98, 101, 115, 116, 32, 121, 101, 97, 114, 32, 121, 111, 117, -30, -128, -103, 118, 101, 32, 101, 118, 101, 114, 32, 104, 97, 100, 44, 10, 97, 110, 100, 32, 116, 104, 97, 116, 32, 101, 97, 99, 104, 32, 78, 101, 119, 32, 89, 101, 97, 114, 10, 119, 105, 108, 108, 32, 98, 101, 32, 98, 101, 116, 116, 101, 114, 32, 116, 104, 97, 110, 32, 116, 104, 101, 32, 108, 97, 115, 116, 46, 10, 77, 97, 121, 32, 121, 111, 117, 32, 114, 101, 97, 108, 105, 122, 101, 32, 121, 111, 117, 114, 32, 102, 111, 110, 100, 101, 115, 116, 32, 100, 114, 101, 97, 109, 115, 10, 97, 110, 100, 32, 116, 97, 107, 101, 32, 116, 105, 109, 101, 32, 116, 111, 32, 114, 101, 99, 111, 103, 110, 105, 122, 101, 32, 97, 110, 100, 32, 101, 110, 106, 111, 121, 10, 101, 97, 99, 104, 32, 97, 110, 100, 32, 101, 118, 101, 114, 121 |
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 <vector> | |
#include <iostream> | |
using namespace std; | |
int main () { | |
vector<int> msg{73, 110, 32, 84, 104, 101, 32, 78, 101, 119, 32, 89, 101, 97, 114, 44, 10, 119, 101, 32, 119, 105, 115, 104, 32, 121, 111, 117, 32, 116, 104, 101, 32, 98, 101, 115, 116, 32, 121, 101, 97, 114, 32, 121, 111, 117, -30, -128, -103, 118, 101, 32, 101, 118, 101, 114, 32, 104, 97, 100, 44, 10, 97, 110, 100, 32, 116, 104, 97, 116, 32, 101, 97, 99, 104, 32, 78, 101, 119, 32, 89, 101, 97, 114, 10, 119, 105, 108, 108, 32, 98, 101, 32, 98, 101, 116, 116, 101, 114, 32, 116, 104, 97, 110, 32, 116, 104, 101, 32, 108, 97, 115, 116, 46, 10, 77, 97, 121, 32, 121, 111, 117, 32, 114, 101, 97, 108, 105, 122, 101, 32, 121, 111, 117, 114, 32, 102, 111, 110, 100, 101, 115, 116, 32, 100, 114, 101, 97, 109, 115, 10, 97, 110, 100, 32, 116, 97, 107, 101, 32, 116, 105, 109, 101, 32, 116, 111, 32, 114, 101, 99, 111, 103, 110, 105, 122, 101, 32, 97, 110, 100, 32, 101, 110, 106, 111, 121, 10, 101, 97, 99, 104, 32, 97, 110, 100, 32, 101, 118, 101, 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 <iostream> | |
#include <vector> | |
#include <unordered_set> | |
using namespace std; | |
int get(vector<int>& parent, int v) { | |
if (parent[v] == v) return v; | |
return parent[v] = get(parent, parent[v]); | |
} |
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; | |
using ll = long long; | |
using ld = long double; | |
string encrypt(string text) { | |
char key = 15; | |
for (int i = 0; i < text.size(); ++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 <iostream> | |
#include <string> | |
using namespace std; | |
string solve(int num, string rem, int n) { | |
if (n == 0) { | |
if (rem[0] >= '5') return to_string(num + 1); | |
else return to_string(num); | |
} else { |
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; | |
using ll = long long; | |
using ld = long double; | |
ll solve(int v, vector<ll>& arr, vector<vector<int>>& tree, bool f) { | |
ll ans = arr[v]; | |
for (int to: tree[v]) { |
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; | |
using ll = long long; | |
using ld = long double; | |
int main(int argc, char **argv) { | |
ios::sync_with_stdio(false); | |
srand(time(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
public class Quine | |
{ | |
public static void main(String[] args) | |
{ | |
char q = 34; // Quotation mark character | |
String[] l = { // Array of source code | |
"public class Quine", | |
"{", | |
" public static void main(String[] args)", | |
" {", |
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; | |
using ll = long long; | |
inline bool eq(vector<int>& a, vector<int>& b, int l, int r) { | |
for (int i = l; i <= r; ++i) { | |
if (a[i] != b[i])return false; | |
} |
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; | |
using ll = long long; | |
const int kSize = 101; | |
int main() { | |
#ifdef HOME |
NewerOlder