uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
33850fa9-1967-45a3-b014-e26447f52905
polaarbear/SharpReel
SharpReel/stockfish/src/main.cpp
#include <iostream> #include "bitboard.h" #include "endgame.h" #include "position.h" #include "psqt.h" #include "search.h" #include "syzygy/tbprobe.h" #include "thread.h" #include "tt.h" #include "uci.h" using namespace Stockfish; int main(int argc, char* argv[]) { std::cout << engine_info() << std::endl; Comm...
TOOL
0.891385
4.848976
a006e367-7d28-419c-917b-3984bb19cfd0
rapidswap/algorithm-study
기타/바탕화면정리.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; vector<int> solution(vector<string> wallpaper) { vector<int> answer; int minY=51,maxY=-1; int minX=51,maxX=-1; for(int i=0;i<wallpaper.size();i++){ for(int j=0;j<wallpaper[0].size();j++){ if(wallpaper...
ALGO
0.996482
4.579746
22f06f11-8e90-4b48-a8df-976658973fb2
ishandutta2007/codeforces
kyo20111/normal/1255/D.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; int t,n,m,k,dx[4]={0,1,0,-1},dy[4]={1,0,-1,0},chk[111][111]; char mp[111][111],out[70]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",ans[111][111]; int main(){ scanf("%d",&t); while(t--){ scanf("%d %d %d",&n,&m,&k); for(int i=1;...
ALGO
0.999962
3.312575
5a04ee7d-db7e-4813-bce7-ad4dbeecf3cb
Yaro2709/AlgoProblems
8/96A.cpp
#include <iostream> using namespace std; int main() { string s; cin >> s; int n = s.size(); int c1 = 0, c0 = 0, i = 0; string res = "NO\n"; while (i < n) { while (i < n && s[i] == '0') c0++, i++; while (i < n && s[i] == '1') c1++, i++; if (c0...
ALGO
0.99978
3.558308
0db9bd88-0be5-42ba-bbac-baa2ba037c30
gongjun136/pointcloud_registration
thirdparty/tbb/oneTBB-2019_U8/oneTBB-2019_U8/examples/pipeline/square/square.cpp
// // Example program that reads a file of decimal integers in text format // and changes each to its square. // #include "tbb/pipeline.h" #include "tbb/tick_count.h" #include "tbb/task_scheduler_init.h" #include "tbb/tbb_allocator.h" #include <cstring> #include <cstdlib> #include <cstdio> #include <cctype> #include "...
DATA
0.930458
5.261898
3830022c-d2e9-496c-bf48-06f0fa79000a
Schr0Smi1ey/LeetCode
POTD/Dec'23/Easy/Destination_city.cpp
class Solution { public: string destCity(vector<vector<string>>& paths) { map<string,int> mp; set<string> st; for(int i=0;i<paths.size();i++){ mp[paths[i][0]]++; st.insert(paths[i][0]); st.insert(paths[i][1]); } string ans; for(auto...
ALGO
0.999722
5.480009
86d4cd42-21d1-40aa-be3b-9c7a24c1a157
elcerdo/projecteuler
problem04.cpp
#include <iostream> #include <sstream> #include <set> using std::cout; using std::endl; bool is_palindrome(const std::string &str) { std::string::const_iterator direct=str.begin(); std::string::const_reverse_iterator reverse=str.rbegin(); while (direct!=str.end()) { if (*direct!=*reverse) return f...
ALGO
0.999607
5.37422
3a0c9960-386c-4bf7-8e7b-5ffaba7016cd
strain7626/BaekJoon
20207_Gold5_달력.cpp
#include <bits/stdc++.h> using namespace std; int N, work[366], h, w, ans; int main() { cin >> N; while (N--) { int S, E; cin >> S >> E; for (int i = S; i <= E; i++) work[i]++; } for (int i = 1; i <= 365; i++) { if (!work[i]) { ans += h*w; h = w = 0; ...
ALGO
0.999548
4.167936
643c2eaf-a3ce-4d8f-9a77-2aafb30ced21
AnhZhang1994/oop
Project4/info.cpp
#include "info.h" vector<Info> per; int Info::count = 0; int Info::GetId() { return id; } void Info::SetName() { cout << "name:"; cin >> name; } string Info::GetName() const { string tmp = name; return tmp; } void Info::SetTel() { cout << "tel:"; cin >> tel; } string Info::GetTel() const...
TOOL
0.912857
3.803394
b9a46fd0-de99-4e2d-bb6a-0fa0c5ccac0b
projectchrono/chrono
src/demos/mbs/demo_MBS_pendulum.cpp
#include "chrono/physics/ChSystemNSC.h" #include "chrono/physics/ChBodyEasy.h" #include "chrono/core/ChRealtimeStep.h" #include "chrono_irrlicht/ChVisualSystemIrrlicht.h" using namespace chrono; using namespace chrono::irrlicht; // ----------------------------------------------------------------------------- // App...
ALGO
0.996405
6.151454
2a09bf86-fb85-4a84-8750-2f7c3a260993
ishandutta2007/codeforces
laycurse/normal/1368/F.cpp
#pragma GCC optimize ("Ofast") #include<bits/stdc++.h> using namespace std; template<class S, class T> inline S max_L(S a,T b){ return a>=b?a:b; } inline int my_getchar(){ return getchar(); } inline void rd(int &x){ int k; int m=0; x=0; for(;;){ k = my_getchar(); if(k=='-'){ m=1; break; ...
ALGO
0.999952
3.340966
f1b1ddce-c11b-4384-9309-35762f5e9b28
kbc19b13/BCR
tkEngine/bulletPhysics/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp
//#define DISABLE_BVH #include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h" #include "BulletCollision/CollisionShapes/btOptimizedBvh.h" #include "LinearMath/btSerializer.h" ///Bvh Concave triangle mesh is a static-triangle mesh shape with Bounding Volume Hierarchy optimization. ///Uses an interface to a...
ALGO
0.96675
7.193789
56216a63-ca29-4c8a-af1c-7a31229648ee
RaduAlbastroiu/Minotaur
Cocos2d/cocos2d-x-3.17.1/cocos2d-x-3.17.1/tools/simulator/libsimulator/lib/ProjectConfig/SimulatorConfig.cpp
#include "SimulatorConfig.h" #include <sstream> SimulatorConfig *SimulatorConfig::_instance = NULL; SimulatorConfig *SimulatorConfig::getInstance() { if (!_instance) { _instance = new SimulatorConfig(); } return _instance; } SimulatorConfig::SimulatorConfig() { _screenSizeArray.push_back(...
CONFIG
0.864434
4.272131
cc453c2a-004b-477e-8de7-0c51ff78696a
hoangtien2k3/Code-C-plus-plus
LamBaiTapThue/04_12_2022/test.cpp
/* Hãy liệt kê các vị trí trong mảng 1 chiều các số thực mà giá trị tại đó bằng giá trị âm đầu tiên trong mảng. Yêu cầu: C++ OOP(hướng đối tượng). */ #include<bits/stdc++.h> using namespace std; template<typename T, typename V> class ThongTin { protected: T n; public: ThongTin<T, V>() {} // ...
ALGO
0.999795
4.116582
d3e4df4a-9a19-443a-b164-a4794cd028a3
shishir2305/CoderArmySheetSolutions
02_Strings/61.cpp
// length of last word // algorithm -> start counting from the last of the string and avoid whitespaces, once you encounter a word start counting that word till you receive a whitespace again // t.c. -> O(n) // s.c -> O(1) #include <bits/stdc++.h> using namespace std; int lengthOfLastWord(string s) { int i = s.s...
ALGO
0.999369
5.219683
f45c18b4-510d-45e0-9b38-5f161d211d4f
korli/haiku-jarek
src/apps/haiku3d/MathUtils.cpp
// Some math utils, useful for animation #include "MathUtils.h" #include <math.h> float MathUtils::EaseInOutCubic(float time, float start, float distance, float duration) { time /= duration / 2.0; if (time < 1.0) return distance / 2.0 * time * time * time + start; time -= 2.0; return distance / 2.0 * (time *...
ALGO
0.988048
6.601368
0a32f023-df74-4d58-bfeb-bbf84145a262
hajnalmt/things-done
BME/Szamitogepes_latrendszerek_1f/Calibration Demo/Calibration Demo/reconstruction.cpp
#include "reconstruction.h" void ReconstructStereo() { // Load stereo images cv::Mat left, right; left = cv::imread( projectPath_ + "r0001.png" ); right = cv::imread( projectPath_ + "0001.png" ); // Resize and convert them to graysclae cv::resize( left, left, cv::Size( 960, 540 ) ); cv::resize( right, right...
ALGO
0.973084
4.45429
2a4a92c8-a819-4314-a4b9-76487631d670
lmd-in-learning/EverydayCoding
DailyCoding/IndexMinPQ.cpp
#include <assert.h> #include <stdlib.h> #include "IndexMinPQ.h" #include "OutputString.h" IndexMinPQ::IndexMinPQ(): m_PQ(), m_QP(), m_keys(), m_nSize(0), m_nMaxN(0) { } IndexMinPQ::IndexMinPQ(int maxN): m_PQ(maxN + 1), m_QP(maxN + 1), m_keys(maxN + 1), m_nSize(0), m_nMaxN(maxN) { for (int i = 0; i <= maxN; +...
ALGO
0.995835
4.298766
f44c1872-9a9e-4799-a862-7a2442f7a0b8
Alien166/Vjudge
Coach_academy/Level_2/Greedy/F - Mark and Toys.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { long long n, k; cin >> n >> k; vector<int> prices; for(int i = 0; i < n; i++) { int p; cin >> p; prices.push_back(p); } sort(prices.begin(), prices.en...
ALGO
0.999932
4.418458
9810c9f1-0842-4d94-9944-1d8c8f5f826d
strn18/cpp_practice
sw expert academy/기초학습/No_11.cpp
// [S/W 문제해결 응용] 3일차 - 공통조상(4. 트리) #include <iostream> #include <string> #define MAX 10000 using namespace std; typedef struct{ int left, right, parent; } node; node tree[MAX+1]; bool visited[MAX+1]; void init(int V); int visit_ancestors(int num); int count_subtree(int num); int main(){ ios_base::sync_with_std...
ALGO
0.999943
4.109678
2767f323-75b4-4b93-8e57-9c1e6df92a84
mushe/GraphicsProt
src/Samples/Demo/Eratosthenes/Eratosthenes.cpp
#include "Eratosthenes.h" #include <thread> #include <iostream> #include <chrono> void Eratosthenes::Reset() { numberObjects_.clear(); for(int i = 1; i <= maxNumber_; i++) { NumberObject obj; obj.number_ = i; obj.position_ = Vec2 ( 0.07f + 0.06f * ((i-1) % col_)...
ALGO
0.93674
4.335196
5dfe37f8-f649-4abc-877a-5ffcb644b759
URSec/SVA-Compiler
clang-tools-extra/clangd/QueryDriverDatabase.cpp
#include "GlobalCompilationDatabase.h" #include "Logger.h" #include "Path.h" #include "Trace.h" #include "clang/Driver/Types.h" #include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/StringExtras.h" #include "llv...
TOOL
0.977838
7.910051
94965544-a1c7-45fa-b985-1301880872d6
ishandutta2007/codeforces
antontrygubo_o/normal/1620/B.cpp
#include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <bits/stdc++.h> #pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") using namespace __gnu_pbds; using namespace std; using ll = long long; using ld = long double; typedef tree< ...
ALGO
0.999942
4.68264
6d73291b-c710-489b-9402-0d09c0627703
Priyanka7777777/Cognizance
THARANIESH/White_hats-Frontend-development/windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.997622
6.785645
12ac11ca-6f29-48d2-ac7a-857e67629082
CosCloud/AmazonSDESheetGFG
Easy/Largest subarray with 0 sum/largest-subarray-with-0-sum.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends /*You are required to complete this function*/ class Solution{ public: int maxLen(vector<int>&A, int n) { int sum=0, len=0; unordered_map<int,int> mp; for(int i...
ALGO
0.999792
6.3818
a8f025a9-e1fc-4cb3-b78f-4f0df4e3177d
ashikurrahmanbhuiyan/codeforces
2021_lastYear/B.cpp
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int t; cin>>t; while(t>0){ int n; cin>>n; if (n == 0) { cout<<""<<endl; } else{ char s[n]; for (int i = 0; i < n; ++i) { cin>>s[i]; } int index = n-1; for (int i = 0; i < n-1; ++i) { if (s[i] <=...
ALGO
0.999976
3.951184
2bc9c420-2ce5-4ea1-a0cd-2e2ec530af8b
zqingithub/leetcode
Basic Calculator/main.cpp
#include<iostream> #include<queue> #include<stack> using namespace std; struct unit { bool isOper; char oper; int value; unit(char oper):isOper(true),oper(oper){} unit(int value):isOper(false),value(value){} }; class Solution { public: int calculate(string s) { stack<char> oper; ...
ALGO
0.999914
4.655229
e12dabbd-457a-4b99-a39e-0dddd52b6c2c
nabil-repo/PL
syl/all/round robin/roundr.cpp
#include <iostream> using namespace std; void queueMaintainence(int queue[], int n) { for (int i = 0; (i < n - 1) && (queue[i + 1] != 0); i++) { int temp = queue[i]; queue[i] = queue[i + 1]; queue[i + 1] = temp; } } void queueUpdation(int queue[], int timer, int arrival[], int n, i...
ALGO
0.999914
4.460958
80d0bbdc-2153-48f2-8183-d413f6b1d673
priv8io/Mod-Menu_HookAPKKiller
app/main/jni/KittyMemory/KittyScanner.cpp
#include "KittyScanner.hpp" #ifdef __ANDROID__ #include <map> #include <dlfcn.h> #endif #include "KittyUtils.hpp" // refs // https://github.com/learn-more/findpattern-bench namespace KittyScanner { bool compare(const char *data, const char *pattern, const char *mask) { for (; *mask; ++mask, ++data,...
TOOL
0.891132
3.699406
3ebe5d30-90fd-49b0-a845-94bb1fc238a9
GarageGames/Torque3D
Engine/lib/recast/Detour/Source/DetourNavMeshBuilder.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <float.h> #include "DetourNavMesh.h" #include "DetourCommon.h" #include "DetourMath.h" #include "DetourNavMeshBuilder.h" #include "DetourAlloc.h" #include "DetourAssert.h" static unsigned short MESH_NULL_IDX = 0xffff; struct BVItem { unsigned short ...
ALGO
0.98743
7.008854
0f7880d7-ed2a-44b7-b563-ebdfc3d8357c
daily-boj/SkyLightQP
P11441.cpp
#include <iostream> using namespace std; int sum[100001] = {}; int a[100001] = {}; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; cin >> N; for(int i = 1; i <= N; i++) { cin >> a[i]; } sum[1] = a[1]; for(int i = 2; i <= N; i++) { ...
ALGO
0.999926
4.41537
f3007a88-0b5d-4e6e-ae5d-746ea298cdca
rockychowdhury/Algorithm
Tecniques/Slow_Fast_Pointer.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define For(i,s,n)for(int i=s;i<n;i++) typedef pair<int,int>pii; const int INF=1e9+7; const int N=1e5+5; const int M=1e3+5; int i,j; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin>>n; int arr[n]; ...
ALGO
0.999792
3.978942
532acd9a-bb0c-42dc-97b3-76ecd902de96
yaseenabdulghany/MO-Algorithm
brute force with TLE.cpp
#include <bits/stdc++.h> using namespace std; #define FAST_DOT_COM ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define int long long const int N = 3e4+5 ,MOD=1e9+7, INF=0X3F3F3F3F , MAX= 1e9+7; bool comp(pair<int, int> &a,pair<int,int> &b) { if (a.first != b.first) return a.first > b.first; ...
ALGO
0.999925
4.784177
4ac83609-cc02-4343-81e6-41a2ea5db902
tiny656/PAT
Data Structures and Algorithms (English)/7-6_Root of AVL Tree (25).cpp
#define _CRT_SECURE_NO_DEPRECATE #define _SECURE_SCL 0 #pragma comment(linker, "/STACK:66777216") #include <algorithm> #include <string> #include <complex> #include <cassert> #include <memory> #include <set> #include <stack> #include <map> #include <list> #include <deque> #include <numeric> #include <cctype> #include <...
ALGO
0.999883
4.112534
5a3befda-89a9-4eb0-8d6a-4346ad2fabde
edumartinsrib/zxing-teste
core/src/ReedSolomonEncoder.cpp
#include "ReedSolomonEncoder.h" #include "GenericGF.h" #include <algorithm> #include <iterator> #include <stdexcept> namespace ZXing { ReedSolomonEncoder::ReedSolomonEncoder(const GenericGF& field) : _field(&field) { _cachedGenerators.push_back(GenericGFPoly(field, { 1 })); } const GenericGFPoly& ReedSolomonEncod...
ALGO
0.923025
6.330062
233c6e06-09cc-4c14-af91-ac5a497e87d9
xhytom/acm
struct/string/kmp.cpp
std::vector<int> kmp(const string &s) { std::vector<int> nxt(s.size()); int n = s.size() - 1; nxt[1] = 0; int j = 0; for (int i = 2; i <= n; i++) { while (s[j + 1] != s[i] && j != 0) j = nxt[j]; if (s[j + 1] == s[i]) j++; nxt[i] = j; } return nxt; }
ALGO
0.994665
5.017277
365dacd8-ba3e-47f2-821b-aa0978d5d04b
VipulChauhan89/GFG-Practice-Problems
3-EASY/Reverse_words_in_a_given_string.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to reverse words in a given string. string reverseWords(string S) { string S1=""; stack<string> st; for(auto c:S) { if(c=='.') ...
ALGO
0.999525
5.977236
857c8dd8-eb91-44aa-b2d4-fd9289fc2cec
hhhhaura/competitive-programming
cses/creating_strings.cpp
#define wiwihorz #include <bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC target("sse") #pragma loop-opt(on) #define rep(i, a, b) for(int i = a; i <= b; i++) #define rrep(i, a, b) for(int i = b; i >= a; i--) #define ceil(a, b) ((a + b - 1) / (b)) #define all(a) a.begin(), a.end() using namespace std; #defi...
ALGO
0.99999
5.279107
7829f426-1471-42f2-9256-2e8e1f81235c
ishandutta2007/codeforces
rush_d_cat/normal/1051/F.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; typedef long long LL; const int N = 100000 + 100; const LL INF = 1e16; int n,m,q; vector< pair<int,int> > g[N]; LL min(LL x, LL y) { return x<y?x:y; } int par[N]; int find(int x) { return par[x]==x?x:par[x]=find(par[x]); } struct Ed...
ALGO
0.999991
4.796098
dfcd9a6d-7474-4775-9cfd-ffd41328b762
dangduongcoder/PTIT-Code
c++/CPP0513.cpp
//Duong #include <bits/stdc++.h> using namespace std; typedef long long ll; #define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); const int MOD = 1e9 + 7; const ll INF = 1e18; struct SinhVien { string name, cls; int id, d, m, y; float gpa; }; void nhap(struct SinhVien arr[], int n){ for ...
ALGO
0.904765
4.010815
2143df1e-39d2-4437-b7f1-7292c7ae8895
rajibdpi/leetcode-sol-mkdocs
main/solutions/0366. Find Leaves of Binary Tree/0366.cpp
class Solution { public: vector<vector<int>> findLeaves(TreeNode* root) { vector<vector<int>> ans; depth(root, ans); return ans; } private: // Depth of root (0-indexed) int depth(TreeNode* root, vector<vector<int>>& ans) { if (root == nullptr) return -1; const int l = depth(root->...
ALGO
0.999907
6.78647
328c5d07-117e-4c05-b175-ea213db26dd1
aadarsh231099/GFG
raw cpp files/MEDIUM/Smallest Positive missing number.cpp
//https://practice.geeksforgeeks.org/problems/smallest-positive-missing-number-1587115621/0 //Smallest Positive missing number class Solution { public: //Function to find the smallest positive number missing from the array. int missingNumber(int arr[], int n) { // Your code here sort...
ALGO
0.999927
4.26485
4f1c0fc2-8915-4ef9-88b9-48e12a6115c0
zdzhaoyong/EICAM
Thirdparty/eigen3/doc/examples/DenseBase_middleRows_int.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; int main(void) { int const N = 5; MatrixXi A(N,N); A.setRandom(); cout << "A =\n" << A << '\n' << endl; cout << "A(2..3,:) =\n" << A.middleRows(2,2) << endl; return 0; }
ALGO
0.970615
3.307581
29de97fd-d704-433b-b9e2-3ea93fd22b5f
Charandeepoo7/DSA-Questions
LinkedList/Llinsertatnode.cpp
#include<iostream> using namespace std; class Node { public: int data; Node *next; }; Node *insertAtNode(Node *head,Node *prevnode,int data){ Node *ptr = new Node(); ptr ->data = data; ptr ->next = prevnode ->next; prevnode ->next = ptr; return head; } void linkedListTraversal(Node *p...
ALGO
0.998976
4.309972
5d2b0086-8ff6-4125-a2fb-0651174dc996
IgorPBorja/competitive-programming
problems/CSES/geometry/convex_hull.cpp
// #define TESTCASES #define INCLUDE_COLLINEAR true #include <bits/stdc++.h> using namespace std; #define i64 int64_t #define endl '\n' #define fastio ios_base::sync_with_stdio(false);cin.tie(NULL) #define all(x) begin(x),end(x) #define printmsg(msg, first, last) cout << msg; for(auto it = first; it != last; it++){co...
ALGO
0.999932
5.55848
a28bd9cb-3e83-4ade-97b5-f885b9c82aa1
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/September/CoronaVirusSpread2_20200909095257.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #define vv vector #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define printM...
ALGO
0.999978
3.09646
56531ee3-a707-4254-9aa7-70e4686a17ed
Rajan9089/CPP-CODE
Accenture/MagicNo_1_to_N.cpp
#include <bits/stdc++.h> using namespace std; int MagicNumberFrom_1_to_N(int n) { // convert to binary // make 0 to 1 and , 1 to 2; // sum all the bits // check for sum is odd or even // if odd, then increase the Magic no count int magicCount = 0; for (int i = 1; i <= n; i++) { int...
ALGO
0.999863
5.732503
ca194548-2337-43c7-9ded-f28665472d29
hzfsls/leetcode-supercrawl
data/0855.exam-room/code_snippets/sol.cpp
class ExamRoom { public: ExamRoom(int n) { } int seat() { } void leave(int p) { } }; /** * Your ExamRoom object will be instantiated and called as such: * ExamRoom* obj = new ExamRoom(n); * int param_1 = obj->seat(); * obj->leave(p); */
ALGO
0.938753
3.880821
f5e1a0d6-2308-42d7-b00b-eb9a5c26bc11
ishandutta2007/codeforces
rfpermen/normal/620/A.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O2") using namespace std; #define ll long long #define rep(i,n,N) for(int i=n;i<=N;i++) #define rap(i,n,N) for(int i=(int)n;i>=(int)N;i--) #define mp make_pair #define pb push_back #define pob pop_back #define pf push_front #define pof pop_front #define fi first #define s...
ALGO
0.999351
3.603522
7e603af9-8b4a-44eb-ae43-2fa327decd40
CarolinaMoura/oi
IOI/2017/books.cpp
#include "books.h" #include <bits/stdc++.h> #define debug printf #define lp(i,a,b) for(int i = a ; i < b; i++) #define pb push_back #define ff first #define ss second #define mk make_pair #define pii pair<int,int> #define ll long long #define all(x) x.begin(),x.end() #define sz(x) (int)(x.size()) const int MAX = 1...
ALGO
0.999888
3.483023
2a4dfe12-ef6f-4f9e-b85e-7f9c2cfba9eb
freddyartha/store_cashier
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
67d75b8b-e88c-4831-a9a7-b31061cd7c0b
LABZHG/AlgorithmsTraining-
con set.cpp
#include <bits/stdc++.h> using std::vector; using std::queue; using std::cout; /* typedef struct GNode *Graph; struct GNode{ int v; int weight; GNode(){}; GNode(int _a,int _b): v(_a),weight(_b){} }; vector<vector<GNode> > G; */ typedef vector<vector<int> > Graph; Graph G; int N=0,E=0; vector<bool> vis...
ALGO
0.999962
4.29656
882b3477-0031-448f-b386-ed866ec74f8a
bartvbl/Dissimilarity-Tree-Reproduction
src/partialRetrieval/lib/glm/test/core/core_func_integer_find_lsb.cpp
#include <glm/glm.hpp> #include <cstdio> #include <cstdlib> //To define "exit", req'd by XLC. #include <ctime> int nlz(unsigned x) { int pop(unsigned x); x = x | (x >> 1); x = x | (x >> 2); x = x | (x >> 4); x = x | (x >> 8); x = x | (x >>16); return pop(~x); } int pop(unsigned x) { x = x...
ALGO
0.994546
4.83064
5cbd8089-cc72-4ae8-b5bb-73176352b48b
Randowlh/Project_ACM_2021
code/hdoj/3585.cpp
#include <bits/stdc++.h> using namespace std; int mp[2000][2000]; vector<int> R[2000], P[2000], X[2000]; int n, k; int nw = 0; bool Bron_Kerbosch(int t) { if (R[t].size() + P[t].size() < k) return 0; if (R[t].size() >= k) { return 1; } if (!P[t].size() && !X[t].size()) { ...
ALGO
0.999959
3.814192
95e02aa6-08de-4482-aeac-16451d08fcc0
raincross7/code-similarity
codes/train_code/problem061/problem061_187.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> #define flush fflush(stdout) using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> Pl; const int mod = (int)1e9 + 7, INF = (int)1e9; const int di[4] = { 1,0,-1,0 }, dj[4] = { 0,1,0,-1 }; int main(void) { ...
ALGO
0.999969
3.961064
8211679b-9a6c-4aeb-b500-241f906399ea
sinian666/code_41_28
cpp_副本10/chapter_sorting/merge_sort.cpp
/** * File: merge_sort.cpp * Created Time: 2022-11-25 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 合并左子数组和右子数组 */ // 左子数组区间 [left, mid] // 右子数组区间 [mid + 1, right] void merge(vector<int> &nums, int left, int mid, int right) { // 初始化辅助数组 vector<int> tmp(nums.begin() + left, nums.begin() ...
ALGO
0.999981
5.834587
974f461e-700b-4bd6-9f84-b84cd30b4c50
sinian666/code_102_5
cpp_副本60/chapter_tree/binary_search_tree.cpp
/** * File: binary_search_tree.cpp * Created Time: 2022-11-25 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 二叉搜索树 */ class BinarySearchTree { private: TreeNode *root; public: BinarySearchTree(vector<int> nums) { sort(nums.begin(), nums.end()); // 排序数组 ro...
ALGO
0.999915
6.349885
b95d87cb-3152-4e23-8595-8cba53295d0c
bhooshan123/leetcode
1293-three-consecutive-odds/1293-three-consecutive-odds.cpp
class Solution { public: bool threeConsecutiveOdds(vector<int>& arr) { int c=0; for(int i:arr){ if(i%2!=0)c++; else c=0; if(c==3)return true; } return false; } };
ALGO
0.999692
5.634429
93007a52-85f3-4806-b3ee-d7bfabdf7051
Amylo-jh/baekjoon
9000s/9316.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; for(int i = 1; i <= n ; i++) { cout << "Hello World, Judge " << i << "!\n"; } }
ALGO
0.955499
3.429128
634a6dfd-c703-435b-83f2-f709128168b3
pdxdsbzl/start-a-new-life
10.19.17.05.cpp
#include<stdio.h> int main() { int a,b; char c; scanf("%d%c%d",&a,&c,&b); switch(c) { case '+':printf("%d",a+b);break; case '-':printf("%d",a-b);break; case '*':printf("%d",a*b);break; case '/':printf("%d",a/b);break; default:printf("ԭҲԭ"); } }
ALGO
0.999856
3.143927
226c7eda-15cf-4046-bd01-36d7ac0a3ea2
mwashief/step
AtCoder/ARC121/arc121_c.cpp
/* Washief Hossain Mugdho 15 October 2021 AtCoder ARC121 arc121_c */ #ifndef __DEBUG__ #pragma GCC optimize("Ofast") #pragma GCC optimization("unroll-loops, no-stack-protector") #pragma GCC target("avx,avx2,fma") #endif #undef __INTERACTIVE__ #include <bits/stdc++.h> #define pb push_back #define mp make_...
ALGO
0.999973
5.012364
7be8e260-bc52-433d-a44c-6d8d237941b0
sameer-19/Leetcode
893-groups-of-special-equivalent-strings/893-groups-of-special-equivalent-strings.cpp
class Solution { public: int numSpecialEquivGroups(vector<string>& words) { set<pair<string,string>> s; for(int i=0;i<words.size();i++) { pair<string,string> p; for(int j=0;j<words[i].size();j++) { if(j%2==0) p.first+=words[i][j]; ...
ALGO
0.999955
5.979789
2facd07f-aab4-44c6-88b7-df9ea4894b2c
BacqueyYohann/SolvingStrafs
roundingsat-master/src/roundingsat.cpp
#include <csignal> #include <fstream> #include <memory> #include "_aux.hpp" #include "globals.hpp" #include "parsing.hpp" #include "run.hpp" namespace rs { bool asynch_interrupt; Options options; Stats stats; } // namespace rs static void SIGINT_interrupt([[maybe_unused]] int signum) { rs::asynch_interrupt = true;...
TOOL
0.978991
5.171834
313e9c39-fd3f-4597-813d-f7e9e5991ec5
rbunpat/posn-camp1
08/step5.cpp
#include <bits/stdc++.h> using namespace std; int main() { int number, i; cin >> number; for (i = 1; i <= number; i++) { if (i % 2 != 0) { cout << i << endl; } } }
ALGO
0.999329
3.831948
12c130c6-72ba-43d9-95bc-5034ea434f9b
liurui97/Algorithm-experiment-hebut
SUANFASETS/ClosestPair.cpp
// ClosestPair.cpp : implementation file // #include "stdafx.h" #include "SUANFASETS.h" #include "ClosestPair.h" #include "cycle.h" #include <sys/timeb.h> #include <windows.h> inline unsigned GetCyCount(){ __asm _emit 0x0f __asm _emit 0x31 } #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE...
ALGO
0.999368
4.861313
1d0f7073-68c5-46cf-8f7a-eff67e5e074b
slitvinov/lammps-sph-multiphase
src/USER-OMP/pair_tip4p_long_soft_omp.cpp
/* ---------------------------------------------------------------------- Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ #include "math.h" #include "pair_tip4p_long_soft_omp.h" #include "atom.h" #include "domain.h" #include "comm.h" #inclu...
ALGO
0.999354
5.961503
752d5d70-147f-4ea0-a82a-9c57975a89ec
Siyu-ZOUZOU/Project_siyu
others/region_growing_segmentation.cpp
#include <iostream> #include <vector> #include <cmath> #include <pcl/pcl_base.h> #include <pcl/common/common.h> #include <pcl/point_types.h> #include <pcl/io/pcd_io.h> #include <pcl/search/search.h> #include <pcl/search/kdtree.h> #include <pcl/filters/voxel_grid.h> #include <pcl/features/normal_3d.h> #include <pcl/visu...
ALGO
0.993668
3.846952
44cbc1db-7232-4b75-87a2-edc4de2c0011
ishandutta2007/codeforces
myungwoo/normal/696/A.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fr first #define sc second #define sz(v) ((int)(v).size()) #define all(v) (v).begin(), (v).end() typedef long long lld; typedef pair<int, int> pii; int Q; map <lld, lld> C; lld lca(lld a, lld b) { vector <int> p, q; for...
ALGO
0.999607
3.587703
631ffa56-c4be-4805-bb10-68d1902a3d41
ck89119/Algorithm
Hiho/1048.cpp
/* ID: ck89119 PROG: LANG: C++ */ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <string> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <fstream> #include <iostre...
ALGO
0.999997
3.786478
788eb9f5-c5d5-49df-839d-1570b293d9ed
Livictor213/testing2
template_project_name/main.cpp
#include "engine/easy.h" using namespace arctic; // NOLINT const Si32 kBlockSpriteCount = 3; Sprite g_blocks[kBlockSpriteCount]; const Si32 kFieldWidth = 8; const Si32 kFieldHeight = 16; Si32 g_field[kFieldHeight][kFieldWidth] = { {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, ...
ALGO
0.954109
5.542264
f69a0826-46f0-43bd-95fa-2af36976e869
amang234/GeeksForGeeks-DSA
Difficulty: Medium/Count the paths/count-the-paths.cpp
class Solution { public: int countPaths(vector<vector<int>>& e, int v, int s, int d) { // Code here vector<vector<int>>adj(v); vector<int>in(v , 0); for(auto it : e){ adj[it[0]].push_back(it[1]); in[it[1]]++; } queue<int>q; for(int i ...
ALGO
0.999753
5.731595
054d8f37-2203-4e61-84f7-d83b3e671df6
raincross7/code-similarity
codes/train_code/problem055/problem055_486.cpp
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, n) for(long long i=0;i<(long long)(n);i++) #define Rep(i,k,n) for(long long i=k;i<(long long)(n);i++) #define all(a) a.begin(),a.end() typedef long long ll; typedef pair<ll,ll> P; typedef tuple<ll,ll,ll> PP; typedef priority_queue<ll> ...
ALGO
0.999801
3.799469
571f551c-f6a1-40ea-9b7d-ecf31ccad30b
xuanthu2002/DSA_PTIT_He_2023
DSA02020_so nho nhat co n uoc so.cpp
#include <iostream> using namespace std; const int prime[] = {2, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31}; long long kq; int n; void quayLui(int i, long long res = 1, int cnt = 1) { if(cnt > n) return; if(cnt == n) kq = min(kq, res); int j = 1; while(res * prime[i] <= kq) { res *= prime[i]; quayLui(i + 1, res...
ALGO
0.999961
4.357047
d4b0f5ee-c3e8-49ca-8470-23bc9d96e42d
garciacsci/ECE71
hw05.cpp
/* Homework 5*/ /* * Name: hw05.cpp * Purpose: Tell the user where a pair of variables are if the variables x and y are plotted on a y versus x graph. * Author: Christopher Garcia * Date: 12 February 2020 */ // Preprocessor Directives #include <cstdlib> #include <cmath> #include <iostream> #include <ioma...
TOOL
0.934106
5.095551
868263ce-bf87-4325-9192-d625fec91d35
anuj-das-10/CPP-STL
02_vectors/practice-questions/solution-09.cpp
// 9. Write a function to find the majority element (the element that appears // more than n/2 times) in a vector. If no such element exists, return -1. #include<bits/stdc++.h> using namespace std; void print(string caption, vector<int> vec) { cout << caption; for(int x : vec) { cout << x << ", "; ...
ALGO
0.99993
5.520109
19a1c973-06ed-4516-8c0e-69b08c336d55
darkshuige/codecode
c code/4930.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n) { if(n==0) break; stack<int>st; char op; for(int i=0;i<n;i++) { cin>>op; if(op=='P') { int a; cin>>a; st.push(a); } else if(op=='O') { if(!st.empty()) st.pop(); } else if(op=='A')...
ALGO
0.997528
3.590103
9d985c37-87c2-42b9-9038-d852acc597d3
gabrielvaz9990/AI-lite-avatar
funasr_local/runtime/onnxruntime/src/funasr-onnx-offline-rtf.cpp
#ifndef _WIN32 #include <sys/time.h> #else #include <win_func.h> #endif #include <glog/logging.h> #include "libfunasrapi.h" #include "tclap/CmdLine.h" #include "com-define.h" #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <atomic> #include <mutex> #include <thread> #include <map>...
DATA
0.922401
5.561701
58cef176-f49d-4dd6-b676-bf826c0d9f14
ishandutta2007/codeforces
farhod_farmon/normal/547/C.cpp
#include <bits/stdc++.h> #define lli long long int #define fi first #define se second #define sc scanf #define pr printf #define pb push_back #define mp make_pair #define fin freopen( "input.txt", "r", stdin ); #define fout freopen( "output.txt", "w", stdout ); const int N = 500002; using namespace std; lli n, q, d...
ALGO
0.999885
3.396809
bc2f73fe-46c1-4171-a192-b233cfe30d4c
anuragpratap05/DSA
RECURSION/Recursion_revision/class6/342Power_of_Four.cpp
#include <bits/stdc++.h> using namespace std; bool isPowerOfTwo(int n) { long x = n; if (x == 0 or (x & (x - 1)) != 0) return false; return true; } bool isPositionOdd(uint32_t n) { int cnt = 0; while (n) { cnt++; n = (n >> 1); } if ((cnt & 1)) { retu...
ALGO
0.999611
4.441784
0d227f37-db35-4120-b457-ca56386fbb45
sk3316/DAA-codes
redbus tech interview I/ocrnce_n_ary.cpp
// no. of occurrences of n in an array #include <bits/stdc++.h> using namespace std; int main() { int n, key, arr[10]; int count = 0; cout << "Enter the number of elements in array: " << endl; cin >> n; cout << "Enter array: " << endl; for (int i = 0; i < n; i++) { cin >> arr[i]; ...
ALGO
0.999771
4.767157
35e922b2-b97a-4a62-8fd0-23a9d31822d5
iamslash/learntocode
leetcode/MinimumASCIIDeleteSumforTwoStrings/a.cpp
#include <cstdio> #include <string> #include <vector> // 0 s e a // 0 0 . . . // e . . . // a . // t . // 20ms 100.00% 9.4MB 93.33% // dynamic programming // O(AB) O(B) class Solution { public: int minimumDeleteSum(std::string a, std::string b) { int h = a.size(); int w = b.size(); std::vector<in...
ALGO
0.999983
5.11228
1031935c-de7f-4927-a059-5ae173b7ec06
ishandutta2007/codeforces
apsara/normal/1251/E2.cpp
#pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <ctime> #include <algorithm> #include <iostream> #include <vector> #include <string> #include <map> #include <set> #include <queue> using namespace std; typedef long long LL; typede...
ALGO
0.99997
3.538623
6d5a9393-a680-477e-b79e-a1e3b9fd7554
tamofplease/atcoder_abc
abc264/d/main.cpp
using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define Rep(i, n) for (int i = 1; i <= n; i++) #define ALL(v) v.begin(), v.end() #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) #define ll int64_t using P = pair<int, int>; const int MOD = 1000000007; int main() { string s;...
ALGO
0.999751
3.848731
17e8b261-d673-40ea-a3c8-8c6749f2a138
HiroyoshiNakagawa/ardupilot
libraries/AP_Math/quaternion.cpp
#pragma GCC optimize("O2") #include "quaternion.h" #include "AP_Math.h" #include <AP_InternalError/AP_InternalError.h> #include <AP_CustomRotations/AP_CustomRotations.h> #include <AP_Vehicle/AP_Vehicle_Type.h> #define HALF_SQRT_2_PlUS_SQRT_2 0.92387953251128673848313610506011 // sqrt(2 + sqrt(2)) / 2 #define HALF_SQR...
ALGO
0.985247
7.430884
9461421a-e045-4782-bd78-78a3d15e4d8e
ritikramuka/Pep-Coding
lecture_001/primebool.cpp
#include<iostream> using namespace std; int main(int args, char**argv) { cout<<"enter your number"<<endl; int a; cin>>a; bool flag=true; for(int i=2; i<a/2; i++) {if (a%i==0) {flag=false; break;} } if(flag==true) cout<<"prime "<<a<<endl; else cout<<"not a prime "<<a<<endl; return 0; }
ALGO
0.99936
3.454101
0055dd3d-9fd4-42d9-b32c-0b0812340489
r0snet/arihon
Arihon/chapter_2/section_6/divisor.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using namespace std; typedef long long int ll; typedef long double ld; #define fi first #define se second #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep0(i, n) for (ll i = 0; i <= (n); ++i) #define rep1(i, n) for (ll i = 1; i <= (n); +...
ALGO
0.999904
4.981113
83c31684-05aa-46fc-8bd0-a5f5764a44c9
Arghya0802/LeetCode-GFG-Daily-Challenges
LinkedList/LinkedList Cycle.cpp
// Link: https://leetcode.com/problems/linked-list-cycle/ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: bool hasCycle(ListNode *head) { if(!head) return false ; ...
ALGO
0.99931
5.532248
a5fd7814-3f66-4d2b-a51c-984ed73411ef
Ethics03/DSA-grind
Problems/Powerof4.cpp
#include<bits/stdc++.h> using namespace std; bool isPowerOfFour(int n) { if (n<=0) return 0; int ex=31 - countl_zero((unsigned)n); // checking log 2 //if the power is even and left shifting 1 by that ex gives back the number then // its true return (ex&1)==0 && n==1<...
ALGO
0.991111
3.546097
20fda9ea-d2e5-4985-ad8c-916b143c980c
Arthy22/dsa_ieee
dsa_q20.cpp
/** * Definition for a binary tree node. * struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(): val(0), left (nullptr), right (nullptr) {} TreeNode(int x): val(x), left (nullptr), right (nullptr) {} TreeNode(int x, TreeNode *left, TreeNode *right): val(x), left (left), /** * Definition for a...
ALGO
0.999871
6.330857
6a4bba8a-ab3b-469b-a0fa-dabfb6868475
Richarani-tarase/leetcode
0022-generate-parentheses/0022-generate-parentheses.cpp
class Solution { public: void generate(int n,int i,int j,vector<string>&v,string temp) { if(temp.size()==2*n) { v.push_back(temp); } if(i<n) generate(n,i+1,j,v,temp+'('); if(j<i) generate(n,i,j+1,v,temp+')'); } vector<string> generatePa...
ALGO
0.999832
5.85861
3c2b9ed7-5e7d-496e-b235-4359c89b619e
Prisha0608/Day1
pattern4.cpp
#include <iostream> using namespace std; int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ for(int j=n;j>i;j--){ cout<<" "; } for(int k=1;k<=i;k++){ cout<<"*"; } cout<<"\n"; } }
ALGO
0.999891
3.817227
32f3c3de-1e9e-4758-b205-926ae574bf5c
jterrace/craq
cryptopp560/luc.cpp
// luc.cpp - written and placed in the public domain by Wei Dai #include "pch.h" #include "luc.h" #include "asn.h" #include "nbtheory.h" #include "sha.h" #include "algparam.h" NAMESPACE_BEGIN(CryptoPP) void LUC_TestInstantiations() { LUC_HMP<SHA>::Signer t1; LUCFunction t2; InvertibleLUCFunction t3; } void DL_Al...
ALGO
0.937273
5.458501
393765f6-2caa-494c-809a-b5739c934a34
heyadrsh/dsa-course
43 Arrays - Class 1/reverseArray.cpp
#include<iostream> using namespace std; // First Method // int main(){ // int size=9; // int arr[size]={10,20,30,40,50,60,70,80,90}; // int start=0; // int end=size-1; // while(start<=end){ // swap(arr[start],arr[end]); // start+=1; // end-=1; // } // cout<<"["; // for(int i=0; i<size; i++)...
ALGO
0.999406
3.972753
04dd2f1f-01c5-4ebb-9d3f-f3df4b139db9
joan12222/algorithme
xyd/twotree-xyd3-6.cpp
#include<bits/stdc++.h> using namespace std; int ans[101],cnt=0; struct node{ int left,right; }tree[101]; void pre(int a){ if(tree[a].left!=0) pre(tree[a].left); if(tree[a].right!=0) pre(tree[a].right); cnt++; ans[cnt]=a; } int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>tree[i].left>>tree[i]....
ALGO
0.999973
3.985284
9a7c491f-e4d1-4d94-a22d-55a5f604289c
rajveer-09/HustlerWorkspaceLeetcode
1557-check-if-a-string-contains-all-binary-codes-of-size-k/check-if-a-string-contains-all-binary-codes-of-size-k.cpp
class Solution { public: bool hasAllCodes(string s, int k) { if(s.size() < k) return false; unordered_set<string> seen; long long total = 1 << k; // 2^k for (int i = 0; i <= s.size() - k; i++) { // saare subarray k length ke daal do // agr unique com...
ALGO
0.999736
6.093523
c1b59884-6d93-4267-8611-55c07c1109e6
ishandutta2007/codeforces
hyperbolic/normal/681/C.cpp
#include <iostream> #include <string> #include <queue> #include <vector> std::priority_queue<int, std::vector<int> , std::greater<int> > Q; std::string ans[1000010]; int ans2[1000010]; int num = 1; int main() { int a,b; std::cin>>a; for(int i=1;i<=a;i++) { std::string S; std::cin>>S; if(S=="insert") { st...
ALGO
0.999931
3.976667
df90b1d8-6e0d-4d7e-8264-7fd73ef00772
Subzero-10/leetcode
.history/147.insertion-sort-list_20200928105021.cpp
/* * @lc app=leetcode id=147 lang=cpp * * [147] Insertion Sort List */ // @lc code=start /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNo...
ALGO
0.999981
6.069878
34826d5d-109e-419b-a770-4529b22a709e
Harshika-shri212/leetcode
1078-remove-outermost-parentheses/1078-remove-outermost-parentheses.cpp
class Solution { public: string removeOuterParentheses(string s) { stack<char>st; string res = ""; for(char i : s){ if(st.empty()) st.push(i); else{ if(i == '(') { st.push(i); res = res + i; } ...
ALGO
0.999637
5.994546
18c528c0-ae6f-43a2-85c3-5ec3784c8cd4
K0nnyaku/Code
Data/CSP-JS2021二轮提高组数据/SD-00726/palin/palin.cpp
#include <cstdio> #include <iostream> using namespace std; #define tp int #define n2 (n << 1) #define F(i, a, b) for(int i = a; i <= b; i++) #define UF(i, a, b) for(int i = a; i >= b; i--) #define alledge(i, u) for(int i = head[u]; i; i = edge[i].nxt) #define ll long long #define ull long long #define max(a, b) ...
ALGO
0.999799
3.578488
d39e2513-f3dd-4654-9f25-0e19afd05c67
CarlosDaniel111/competitive-programming
ICPC/NorthAmerica/ECNA/ECNA 2019/B.cpp
#include <bits/stdc++.h> using namespace std; // Pura Gente del Coach Moy using ll = long long; using pi = pair<int, int>; using vi = vector<int>; #define fi first #define se second #define pb push_back #define SZ(x) ((int)(x).size()) #define ALL(x) begin(x), end(x) #define FOR(i, a, b) for (int i = (int)a; i < (int)b...
ALGO
0.999902
4.437939