This file contains hidden or 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
| import os, time, datetime, random | |
| from selenium import webdriver | |
| from selenium.webdriver.common.keys import Keys | |
| from bs4 import BeautifulSoup | |
| img_src = 'blob:https://web.whatsapp.com/4227946a-7a10-47e5-8128-96bead7c0b87' | |
| msg_opt = ['opa', 'chega mais', 'Opa', 'lansa a braba', 'pode mandar', 'manda','opa'] | |
| random.seed(datetime.datetime.now()) |
This file contains hidden or 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
| /// This is a small program to show how to use nom v6 crate to create parsers | |
| /// and how to implement precedence with a parser combinator library. | |
| /// Useful resources: | |
| /// Nom's reference: https://docs.rs/nom/6.0.1/nom/index.html | |
| /// 'Parsing with Nom' section of Gentle rust intro: https://stevedonovan.github.io/rust-gentle-intro/nom-intro.html (it uses an outdated version of nom) | |
| /// Nom's github documentation: https://github.com/Geal/nom/blob/master/doc/making_a_new_parser_from_scratch.md | |
| /// combinators explanations: https://github.com/Geal/nom/blob/master/doc/choosing_a_combinator.md | |
| use nom::{character::complete::digit1, IResult}; | |
| use std::str::FromStr; |
This file contains hidden or 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> | |
| #define ii pair<int,int> | |
| using namespace std; | |
| const int N = 1e5+20; | |
| int n,m; | |
| vector<int> adj[N]; | |
| ii dist[N]; | |
| int i; |
This file contains hidden or 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> | |
| #define ii pair<int,int> | |
| using namespace std; | |
| const int M = 501; | |
| int n,m; | |
| char mat[M][M]={0}; | |
| void fall(int i, int j) { |
This file contains hidden or 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; | |
| int arr[n]; | |
| int ans=1; | |
| for(int i=0;i<n;i++) cin>>arr[i]; |
This file contains hidden or 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
| max(a, b) { if(a > b) return a; return b; } | |
| main(a,b,c) { scanf("%d%d%d",&a,&b,&c); printf("%d\n",max(max(a-(b+c),b),c)); } |
This file contains hidden or 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,m; | |
| cin>>n>>m; | |
| map<int,int> idToCasa; |
This file contains hidden or 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 n=5; | |
| int main() { | |
| int c=1,d=1; | |
| int arr[n]; | |
| for(int i=0;i<n;i++) cin>>arr[i]; |
This file contains hidden or 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,m;cin>>n>>m; | |
| int arr[n]; | |
| for(int i=0;i<n;i++) cin>>arr[i]; |
This file contains hidden or 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> | |
| #define ii pair<int,int> | |
| using namespace std; | |
| const int N = 105; | |
| int ds[N]; | |
| void dsBuild() { | |
| for(int i=0;i<N;i++) ds[i]=i; |