uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
30b6c375-1f64-458a-8352-f27dab869c60
ayushkumarsingh2422005/Assignment-3rd-semester
Data Structures/ClassRoom/temp.cpp
#include <algorithm> #include <iostream> #include <stack> using namespace std; int precedence(string x) { if (x == "*" || x == "/") { return 1; } else if (x == "+" || x == "-") { return 0; } else { return -1; } } bool isNum(string x) { if (x == "+" || x == "-" || x == "/" || ...
ALGO
0.999737
4.874304
6be91a95-46c0-44fa-95eb-9d8e5d790e62
mdakram28/leetcode-archive
my-folder/problems/permutations_ii/solution.cpp
class Solution { vector<vector<int>> ret; vector<int> nums; vector<int> prefix; vector<int> freq; public: void add_till_empty() { if (prefix.size() == nums.size()) { ret.push_back(prefix); return; } for (auto it = nums.begin(); it != nums.end();) { ...
ALGO
0.999921
6.219565
3fb5160c-4766-4a04-91f5-10395aa1f813
thienphuoc/axmolcreator-cocos2dxcreator
thirdparty/box2d/src/dynamics/b2_chain_circle_contact.cpp
#include "b2_chain_circle_contact.h" #include "box2d/b2_block_allocator.h" #include "box2d/b2_fixture.h" #include "box2d/b2_chain_shape.h" #include "box2d/b2_edge_shape.h" #include <new> b2Contact* b2ChainAndCircleContact::Create(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB, b2BlockAllocator* ...
ALGO
0.991443
6.13282
58fd4eb4-8e29-4d26-b8f8-1f3d3e7e2e6c
coouir/codetree-TILs
250102/재귀함수를 이용한 3n + 1 수열/3n-plus-1-sequence-with-recursive-function.cpp
#include <iostream> using namespace std; int F(int n) { if (n==1) return 0; if (n%2 == 0) return 1+F(n/2); else return 1+F(3*n+1); } int main() { // Please write your code here. int n; cin >> n; cout << F(n); return 0; }
ALGO
0.999949
4.884629
093825e2-c74d-42f1-a450-3a3efa6e47e7
AlexanderKiselyov/Homework
1-semester/1_8/1_8.cpp
#include <iostream> using namespace std; int main() { char s[255]; char s1[255]; int counter = 0; int num = 0; cout << "Enter the string s: "; cin >> s; cout << "Enter the string s1: "; cin >> s1; for (int i = 0; i < strlen(s); i++) { if (s[i] == s1[0]) { for (int j = 0; i < strlen(s1) && (i+j) < s...
ALGO
0.999684
4.548102
dbbf589d-659c-4f62-85e1-66f4d08e39c6
joker-ht/backup-llvm
tools/llvm-objdump/MachODump.cpp
#include "llvm-objdump.h" #include "llvm-c/Disassembler.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/Triple.h" #include "llvm/BinaryFormat/MachO.h" #include "llvm/Config/config.h" #include "llvm/DebugInfo/DIContext.h" #include "llvm/DebugInfo/DWARF/DWARFContext.h" #include "l...
TOOL
0.857219
4.535395
6e1a9402-8a11-4114-bf0e-0d9e0b642405
kuldeep2040/Codechef_Submissions
F/FLOW10.cpp
// https://www.codechef.com/LP0TO101/problems/FLOW010 #include <iostream> using namespace std; int main() { int t, i; char h; cin>>t; for(i=0; i<t; i++) { cin>>h; if (h=='b'||h=='B') cout<<"BattleShip\n"; else if (h=='c'||h=='C') cout<<"Cruiser\n"; ...
ALGO
0.995608
3.223701
8715a4e7-7391-45fc-8784-5be9483f1cea
Roni-zn/Data-Structure-402
project_5/ArrayusingLinkedlist.cpp
#include <iostream> #include "D:\UNI\projects\Data-Structure-402\project_5\SimpleLinkedlist.cpp" using namespace std; class Array { private: Linked_list l; public: void Add(int); void Insert(int,int); int Delete(int); void print(); }; void Array:: print() { l.print(); } //--- Add --------------...
ALGO
0.997741
3.945957
d197cbff-1cf9-4499-9562-7ea64d2f3501
sagar-karatagi/DSA-All-Problems
LeetCode/2410_Maximum Matching of Players With Trainers.cpp
class Solution { public: int matchPlayersAndTrainers(vector<int>& p, vector<int>& t) { sort(p.begin(),p.end()); sort(t.begin(),t.end()); int i = 0,j = 0; int cnt = 0; while(i<p.size()&&j<t.size()){ if(p[i]<=t[j]){ i++; j++; ...
ALGO
0.999897
5.660093
ded78244-cc26-4493-80da-f24babcf5456
GoerVenfoch/IKIT_1_kurs
19 2 25/2.cpp
#include <iostream> #include <fstream> #include <vector> using namespace std; vector<int> load_txt(ifstream& ist, vector<int>& arr); int search(const vector<int>& arr, int unknown, int index, int end_part); int main() { ifstream in("Input.txt"); if (!in) { cout << "Unable to open the file." << endl; return 1;...
ALGO
0.993979
4.592705
421e69f3-18f3-42a7-a314-b4f2e3fbcd75
Skotpor/MY_routing
vpr/src/place/centroid_move_generator.cpp
#include "centroid_move_generator.h" #include "vpr_types.h" #include "globals.h" #include "directed_moves_util.h" #include "place_constraints.h" #include "move_utils.h" e_create_move CentroidMoveGenerator::propose_move(t_pl_blocks_to_be_moved& blocks_affected, t_propose_action& proposed_action, float rlim, const t_pla...
ALGO
0.999894
6.858027
42029c37-25fd-46ac-9f7c-ace8339cec71
kljoshi/C_plus_plus
Exercise/Chapter11/03.CorporateSalesData.cpp
/* Write a program that uses a structure to store the following data on a company divison: Division Name (such as East, West, North, or South) First--quarter sales Second-quarter sales Third-quarter sales Fourth-quarter sales Total annual sales Average quarterly sales The program should use four variables of...
ALGO
0.88464
4.619973
617bbc05-4a02-44e0-80f4-7aa2bb917d13
aanu2021/Leetcode-Solutions
Number of Ways to Arrive at Destination - GFG/number-of-ways-to-arrive-at-destination.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: typedef long long ll; const ll M = 1e9 + 7; ll mod(ll a){ return ((a%M)+M)%M; } ll mul(ll a,ll b){ return mod(mod(a)*mod(b...
ALGO
0.99989
6.092649
cf30a938-93f1-4ac1-86ac-2d29b05ff925
TakibYeasar/Yeasar_Codeforces_problem_solving
Math/codeforces_1922B.cpp
// Problem link ===>> https://codeforces.com/problemset/problem/1922/B // submission link ===>> https://codeforces.com/contest/1922/submission/247627817 #include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { long long n; cin >> n; vector<lon...
ALGO
0.999948
5.064907
9492ae7f-14ee-45ca-9f08-93ddb9c9617b
srivastavaritik/DSA
113-path-sum-ii/113-path-sum-ii.cpp
class Solution { public: vector<vector<int>> pathSum(TreeNode* root, int sum) { vector<vector<int> > paths; vector<int> path; findPaths(root, sum, path, paths); return paths; } private: void findPaths(TreeNode* node, int sum, vector<int>& path, vector<vector<int> >& paths) ...
ALGO
0.999973
6.150009
4b663717-b3cb-4ac6-9d46-88e95fcb41fc
Lana111/SeaFight
src/SeaFight/ship.cpp
#include "stdafx.h" #include "ship.h" Ship::Ship() { decks = 0; for (int i = 0; i < 4; i++) { coord[i] = { -1, -1 }; state[i] = green; } } void Ship::SetDecks(int d) { decks = d; } int Ship::GetDecks() const { return decks; } void Ship::SetCoord(Coord c) { int i = 0; while (i < decks && coord[i].x != -1...
TOOL
0.948022
4.657872
be235812-706f-46c3-9f00-3322cbb0d00c
hilberthit/PaddlePaddle-
paddle/gserver/layers/CrossEntropyOverBeam.cpp
#include "CrossEntropyOverBeam.h" namespace paddle { void CostForOneSequence::calValidExpandStep() { validExpansionCount_ = 0; goldAsExtraPath_ = true; for (size_t i = 0; i < beams_->expansionCount; ++i) { real gold = static_cast<real>(beams_->gold[i]); if (i) { real* start = beams_->candidateIds...
DATA
0.997893
6.573491
040b0bec-93ef-4834-8e88-e1534bfed56d
ashish1816/DSA
number theory/sieveOfEratosthene.cpp
/****************************************************************************** Sieve of Eratosthenes ---------------------- Time Complexity:- O(log(log n) Space Complexity:- O(n) *******************************************************************************/ #i...
ALGO
0.999406
5.194865
eecd5eb8-0a76-40a5-a1b9-8e5bb5f2c6dd
zhangwj0101/codestudy
algorithm/HDU-ACM/ambition0109/15611.cpp
////////////////////System Comment//////////////////// ////Welcome to Hangzhou Dianzi University Online Judge ////http://acm.hdu.edu.cn ////////////////////////////////////////////////////// ////Username: ambition0109 ////Nickname: Ambition ////Run ID: ////Submit time: 2010-09-24 13:02:20 ////Compiler: Visual C++ ////...
ALGO
0.999951
3.872674
b2bc69ed-4c65-4d40-a860-5ed64e35e92f
vedangiitb/TinyML-MeterReader
components/sscma-micro/core/algorithm/el_algorithm_yolo_pose.cpp
#include "el_algorithm_yolo_pose.h" #include <algorithm> #include <array> #include <cmath> #include <numeric> #include <type_traits> #include <vector> #include "core/el_common.h" #include "core/el_debug.h" #include "core/utils/el_cv.h" #include "core/utils/el_nms.h" namespace edgelab { AlgorithmYOLOPOSE::InfoType A...
ALGO
0.985253
6.477471
1427df71-f973-4829-bceb-c07d0dfdb192
nianxiaohu/rpi_data_structure
lab/lab4/Rectangle.cpp
#include <iostream> #include <algorithm> #include <vector> #include "Rectangle.h" Rectangle::Rectangle( Point2D const &lower_left, Point2D const &upper_right ) : m_lower_left(lower_left), m_upper_right(upper_right) e{ } bool Rectangle::is_point_within( Point2D const &p ) const { return ( p.x() <= m_upper_righ...
ALGO
0.995142
5.599719
f19e6148-5695-4dfe-9a93-1784ea01cd91
xiaoxiaojiayu/acc-bol
random-cache-strategy.cpp
#include "random-cache-strategy.hpp" #include <iostream> #include "ns3/core-module.h" #include "ns3/ndnSIM/NFD/daemon/fw/algorithm.hpp" #include "ns3/scheduler.h" #include "ns3/simulator.h" namespace nfd { namespace fw { NFD_LOG_INIT(RandomCacheStrategy); NFD_REGISTER_STRATEGY(RandomCacheStrategy); RandomCacheStra...
ALGO
0.928899
6.063926
b916121d-4a18-4dc2-9576-17df9bda4d84
allenlin316/LeetCode
Easy/1-Two_Sum.cpp
#include<iostream> #include <vector> using namespace std; vector<int> twoSum(vector<int>& nums, int target) { vector<int> result; for(int i=0; i<nums.size(); i++){ int firstNum = nums[i]; for(int j=i+1; j<nums.size(); j++){ if(firstNum + nums[j] == target){ result = ...
ALGO
0.999484
3.714397
2f54d9fd-7e79-45ab-a9bc-09f5718bacdc
teahyen/souse
Project1/Project1/Main.cpp
#include <iostream> using namespace std; int num(int a,int b) { if (b ==a) { return 0; } else { if (a > b) { for (b; b < a; b++) { if (b % 2 != 0) cout << b; else return; } } else { for (a; a < b; b++) { if (a % 2 != 0) cout << a; return; } } } } ...
ALGO
0.99984
3.895268
87dee5f2-7fe3-436b-adca-12af28e62a98
Cheekybaby/leetcode
374-guess-number-higher-or-lower/guess-number-higher-or-lower.cpp
/** * Forward declaration of guess API. * @param num your guess * @return -1 if num is higher than the picked number * 1 if num is lower than the picked number * otherwise return 0 * int guess(int num); */ class Solution { public: int guessNumber(int n) { int i = 0, j...
ALGO
0.999994
6.033033
359b7597-4a60-428b-968c-d30abbce5de8
ZNLong2203/DSA
LuyThua.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; const int mod = 1e9+7; ll powMod(ll n,ll k) { ll res = 1; while(k) { if(k%2==1) { res*=n; res%=mod; } n*=n; n%=mod; k/=2; } return res; } void solve() { ll n,k; cin >> n >> k; cout << powMod(n,k) << endl; } int main() { int t;...
ALGO
0.999952
4.990083
870fdd17-d2c7-476d-914d-e6001790fab4
bdlemos/Faculdade
Semestre_1/codeforces/magicstick.cpp
#include <iostream> using namespace std; typedef long long unsigned int llu; string magicstick(int firstnumber, int value){ if (firstnumber == 1 && value != 1) return "NO"; if (firstnumber < 4 && value > 3) return "NO"; else return "YES"; } int main(){ int test; llu x, y; cin >> test; for ...
ALGO
0.999825
4.852798
44a63abb-c34c-4f85-abc3-7d4d844b0858
1-on/ACM
算法设计基础/Open Credit System (开放式学习制).cpp
#include "bits/stdc++.h" using namespace std; const int N = 100000 + 10; int n; int a[N]; int main() { int T; cin >> T; while (T--) { cin >> n; for (int i = 1; i <= n; i++) { cin >> a[i]; } int ans = -15000; int temp = a[1]; for (int i = 2; i <...
ALGO
0.999859
4.047553
e9149ade-29de-422c-b3a9-d309eab627e5
Diptendu28/myCprogram
roots.cpp
#include<stdio.h> #include<math.h> int main() { float x1,x2,d,b,a,c,r,y; printf("Enter the value:"); scanf("%f",&a); printf("Enter the value:"); scanf("%f",&b); printf("Enter the value:"); scanf("%f",&c); d=pow(b,2)-4*a*c; x1=(-b+sqrt(d))/2*a; x2=(-b-sqrt(d))/2*a; if(d>0) { printf("%f and %f are the r...
ALGO
0.999062
3.101966
42c2bbd7-fea0-4720-91c9-a239a095b6f3
adorableChowhound/translation_app
nmt/tools/mosesdecoder/moses/TranslationModel/Scope3Parser/ApplicableRuleTrie.cpp
#include "ApplicableRuleTrie.h" namespace Moses { void ApplicableRuleTrie::Extend(const UTrieNode &root, int minPos, const SentenceMap &sentMap, bool followsGap) { const UTrieNode::TerminalMap &termMap = root.GetTerminalMap(); for (UTrieNode::TerminalMap::const_iterator p = termMap...
TOOL
0.916568
5.791298
c6de686f-985a-4812-8727-3880a5de23da
Subzero-10/leetcode
.history/134.gas-station_20200904211110.cpp
/* * @lc app=leetcode id=134 lang=cpp * * [134] Gas Station */ // @lc code=start class Solution { public: int canCompleteCircuit(vector<int>& gas, vector<int>& cost) { int len = gas.size(); vector<int> earn(len); for (int i = 0; i < len; i++) { earn[i] = gas[i] - coo...
ALGO
0.999986
5.998353
50119ba9-4688-4e74-a7d7-5958066435c4
md-jonayed/Phitron_Course
Semester 2/Introduction to Algorithm/Module 11.5 (practice)/2.floodFill.cpp
class Solution { public: vector<pair<int, int>> direction = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}}; void dfs(vector<vector<int>> &image, int sr, int sc, int color, int originalColor) { if (sr < 0 || sr >= image.size() || sc < 0 || sc >= image[0].size() || image[sr][sc] != originalColor) { ...
ALGO
0.999681
6.521859
e600c904-5d77-451d-8a51-7b24fad5a9ab
Shahbaz898414/Codeforces
zzother/test05.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t;cin>>t; while(t-->0){ int n;cin>>n; int arr[1010]; int temp[1010]; for (int i = 1; i <=n; i++){ cin>>arr[i]; temp[i]=i; } if(n==1){ cout<<-1<<endl; ...
ALGO
0.999951
3.826069
2ff76fb2-61c0-46f3-8fb0-1de2bf173df7
mayanjain/LeetCode-Solutions
967-numbers-with-same-consecutive-differences/967-numbers-with-same-consecutive-differences.cpp
class Solution { public: vector<int> ans; void solve(long last,long cur,long mx,int k){ if(cur>=mx){ ans.push_back(cur); return; } if(last+k<=9)solve(last+k,cur*10+(last+k),mx,k); if(last-k>=0 && k!=0)solve(last-k,cur*10+(last-k),mx,k); } ...
ALGO
0.99984
6.870168
675ba285-ce18-4856-8354-49c024d1d8f4
otavioolsilva/MAC0214
Grupo/20-21-ICPC-Latin-American-Regional/j_upsolving.cpp
#include <bits/stdc++.h> using namespace std; void dbg_out() { cerr << endl; } template <typename H, typename... T> void dbg_out(H h, T... t) { cerr << ' ' << h; dbg_out(t...); } #define dbg(...) cerr << #__VA_ARGS__ << ':'; dbg_out(__VA_ARGS__); #define ln cerr << "line:" << __LINE__ << " bao, sow" << endl typedef ...
ALGO
0.999618
4.78319
a31cbcbd-b027-47e5-9329-0cea18eac3fc
tomaszrogala/VoiceRecognitionAI
src/Core/LpcExtractor.cpp
// // Created by Dawid Walenciak on 08/01/2021. // #include "LpcExtractor.h" #include "LinearPredictiveCoding.h" #include <cmath> #include <algorithm> namespace Core { std::vector<double> LpcExtractor::extractFeatures(std::vector<double>& samples, float sampleRate) { int windowSize = getWindowSize(sampleRate); ...
ALGO
0.931658
5.934024
eb685034-7430-4e74-8062-c09ae3958a76
GergesHany/LeetCode_DailyChallenge_2024
01- Jan/29 - Implement Queue using Stacks/29 - Implement Queue using Stacks (Gerges Hany).cpp
class MyQueue { public: queue < int > q; MyQueue() { } void push(int x) { q.push(x); } int pop() { int x = -1; if (q.size()){ x = q.front(); q.pop(); } return x; } int peek() { return q.front();...
ALGO
0.996462
5.394717
8f2e01ee-7c82-41c2-a42e-ad7370bb7125
Aryan810/programming
learn/learn_cpp/codeforces/1400/C_Mad_MAD_Sum.cpp
// #include<atcoder/modint> #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> // #pragma GCC optimize("Ofast,unroll-loops") using namespace std; using namespace __gnu_pbds; // using namespace atcoder; // using mint = modint; #define int long long #define rep(i, n) for(...
ALGO
0.999812
4.566299
ff57183d-2bc1-4a10-8011-1b568939034b
elmarco/mesa
src/glsl/opt_flatten_nested_if_blocks.cpp
/** * \file opt_flatten_nested_if_blocks.cpp * * Flattens nested if blocks such as: * * if (x) { * if (y) { * ... * } * } * * into a single if block with a combined condition: * * if (x && y) { * ... * } */ #include "ir.h" #include "ir_builder.h" using namespace ir_builder; namespace {...
TOOL
0.979517
7.259757
bef27643-d393-48da-8144-35618b920a22
kayaru28/programming_contest
old_contest/at_coder_abc221_D.cpp
#include <iostream> #include <stdio.h> #include <algorithm> #include <map> #include <math.h> #include <queue> #include <vector> #include <stack> #include <set> #include <bitset> using namespace std; #define rep(i,n) for (ll i = 0; i < (n) ; i++) #define rep2(i,n,i2,n2) for (ll i = 0; i < (n) ; i++) for (ll i2 = 0;...
ALGO
0.999955
3.715289
ad3b1d13-1486-435e-8568-a0cfb798d986
dinhtai1104/ctdl_gt_D18
Contest3/Solv/29.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define get(n) ll n; cin>>n #define getStr(s) string s;cin>>s; #define getStrs(s) string s;getline(cin,s); #define set_arr(a,n); ll a[n]; for(int i=0;i<n;i++)cin>>a[i]; #define set_vect(a,n); vector<ll>a(n); for(int i=0;i<n;i++)cin>>a[i]; #define sort_a...
ALGO
0.999823
3.736724
ddb0caa2-353d-447c-a9c3-a36eea7554b3
vsasanka/LeetCode
my-folder/problems/house_robber_iii/solution.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), l...
ALGO
0.999935
6.32862
0308f535-e224-41e6-99a1-d56f7e7c596f
sarvex/leetcode-boo
lcp/LCP 09. 最小跳跃次数/Solution.cpp
class Solution { public: int minJump(vector<int>& jump) { int n = jump.size(); vector<bool> vis(n + 1); queue<int> q{{0}}; vis[0] = true; int ans = 0, mx = 1; while (!q.empty()) { for (int t = q.size(); t; --t) { int i = q.front(); ...
ALGO
0.999996
5.610642
32add54b-3c86-485d-8a70-7c88167d3a8f
ishandutta2007/codeforces
natsugiri/normal/538/B.cpp
#include<cstdio> #include<iostream> #include<vector> #include<algorithm> #include<string> #include<cstring> using namespace std; typedef long long LL; typedef vector<int> VI; #define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i) #define EACH(i,c) for(__typeof((c).begin()) i=(c).begin(),i##_end=(c).end();i!=i##_e...
ALGO
0.99992
3.39923
a8b18328-cba3-4d72-bfee-d096f4cad354
TUE-EE-ES/HalideReuseScheduler
test/correctness/argmax.cpp
#include "Halide.h" #include <stdio.h> using namespace Halide; int main(int argc, char **argv) { // A single-dimensional argmax. Func f, arg_max_f; Var x; f(x) = x * (100 - x); RDom r(0, 100); arg_max_f() = 0; // The clamp is necessary, because otherwise we'll be indexing f // at a ...
ALGO
0.995311
5.907779
e5d2942e-707f-49e3-aacc-f747794a6ae9
charles-pku-2013/CodeRes_Cpp
TICPP-2nd-ed-Vol-two/code/C07/PriorityQueue2.cpp
using namespace std; int main() { priority_queue<int, vector<int>, greater<int> > pqi; srand(time(0)); for(int i = 0; i < 100; i++) pqi.push(rand() % 25); while(!pqi.empty()) { cout << pqi.top() << ' '; pqi.pop(); } } ///:~
ALGO
0.997628
4.203917
34f843d9-d769-4409-9777-e2c7cec92d93
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_755_5.cpp
#include <bits/stdc++.h> using namespace std; const int64_t N = 1e6 + 6, M = 1e9 + 7; int main() { ios::sync_with_stdio(false), cin.tie(nullptr); int T; cin >> T; while (T--) { int64_t n, m = 0, ans = -1; cin >> n; vector<int64_t> a(n); for (int64_t &e : a) cin >> e, m = max(m, e); for (int6...
ALGO
0.999866
4.539153
b52cb6a2-5d20-45a2-a8bd-92e9de83d61a
devserega/cocos2d-x-3.12_panzoomlayer
cocos2d/tools/simulator/libsimulator/lib/runtime/ConfigParser.cpp
#include "json/document.h" #include "json/filestream.h" #include "json/stringbuffer.h" #include "json/writer.h" #include "ConfigParser.h" #include "FileServer.h" // ConfigParser ConfigParser *ConfigParser::s_sharedConfigParserInstance = NULL; ConfigParser *ConfigParser::getInstance(void) { if (!s_sharedConfigPars...
TOOL
0.934156
5.275614
f35cbe73-f6d5-4f60-9d14-469cbcf0c88b
whitecloudy/UERANSIM_forwarder
src/utils/yaml_utils.cpp
#include "yaml_utils.hpp" #include "common.hpp" #include "io.hpp" #include <cctype> #include <stdexcept> #include <yaml-cpp/yaml.h> namespace yaml { static YAML::Node OctalFix(const YAML::Node &node) { auto s = node.as<std::string>(); if (!std::all_of(s.begin(), s.end(), ::isdigit)) return node; ...
TOOL
0.888715
7.621424
d5043164-08e2-42ac-815a-0f78aadda51f
eunseoryu/Algorithmstudy
beakjoon/303/bj11576.cpp
#include <bits/stdc++.h> using namespace std; int main(){ vector<int> ans; int base1, base2, n, tmp, dec=0; cin >> base1 >> base2; cin >> n; for(int i=0; i<n; i++){ cin >> tmp; dec += tmp*pow(base1,n-i-1); } while(dec>0){ ans.push_back(dec % base2); dec = de...
ALGO
0.999916
3.288011
1ee57f62-84df-4a84-9c88-b4201d6f1211
Ritesh0222/Strivers-SDE-Sheet-Challenge
Day 7/Unique Path.cpp
/* Use Combination of steps number of downward step=M-1 number of Upward step=N-1 total steps=M+N-2 solution would be either put N-1 up in M+N-2 (M+N-2)C(N-1) or put M-1 up in M+N-2 (M+N-2)C(M-1) combination combination trick NCr int res=1; for(int i=1;i<=r;i++){ res=(res*(N-r+i)/i) } e.g 10C3--> 10*9*8/3*2*1 */ ...
ALGO
0.999982
6.021576
a0bd44ed-13ef-4818-b397-2256c29a28cb
ishandutta2007/codeforces
peter50216/normal/175/B.cpp
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #include<assert.h> #include<stdarg.h> #include<time.h> #include<string> #include<map> #include<set> #include<algorithm> #include<vector> using namespace std; char in[1010][20]; int x[1010]; pair<int,string> XD[1010]; int main(){ int n,i,j; ...
ALGO
0.999776
3.237635
9a427a9e-f7a0-4b69-b392-ca99c08f6a4e
cottonstonne/datastructures
topgun/one/four.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cout << "enter input:"; cin >> n; for(int i=1;i<=n;i++){ for(int j=i;j>=1;j--){ cout << j; } cout << endl; } return 0; }
ALGO
0.999799
3.915263
7e0c1638-faf4-465a-8cd1-3e275fd1c4d2
wogns1026/PS-boj-
14938.cpp
#include <iostream> #include <algorithm> #include <string> #include <string.h> #include <vector> #include <queue> #define MAXVAL 1501 using namespace std; typedef pair<int, int> PI; int n, m, r; int item[101], dist[101]; vector<PI> adj[101]; bool visit[101]; int main() { cin.tie(0), cout.tie(0); ios::sync_with_std...
ALGO
0.999943
4.338332
6bec5c63-1953-417f-b019-6e366634e027
113bommy/LogicalErrorFixCodeT5
LogicalErrorFix_metric/CodeT5_LineNumber_cpp_gold/Problem_10_CorrectCode_28.cpp
#include <bits/stdc++.h> using namespace std; long long Fast(long long x, long long y) { long long ret = 1; while (y) { if (y & 1) ret = (ret * x) % 1000000007; x = (x * x) % 1000000007, y >>= 1; } return ret; } signed main() { long long n, m, r, c, ax, ay, bx, by, k; scanf("%lld%lld%lld%lld%lld", &n, &m, ...
ALGO
0.99985
3.854132
6d8b8833-5742-490a-8096-2e8cbdf82f6c
DriRSantos/curso-algoritmo-e-logica-programacao-nelio
3 - Linguagem C++/4 - Matriz - ler-duas-matrizes-gerar-terceira-da-soma-delas.cpp
#include <iostream> using namespace std; int main(){ int M, N; cout << "Quantas linhas vai ter cada matriz? "; cin >> M; cout << "Quantas colunas vai ter cada matriz? "; cin >> N; int matA[M][N], matB[M][N], matsoma[M][N]; cout << "Digite os valores da matriz A: " << endl; for (int...
ALGO
0.998459
4.194004
62b8a3cf-309d-4c6f-bce8-ea6e4569393e
sheisc/TIPS
SVF.ORIG/svf/lib/MTA/MHP.cpp
/* * MHP.cpp * * Created on: Jan 21, 2014 * Author: Yulei Sui, Peng Di */ #include "Util/Options.h" #include "MTA/MHP.h" #include "MTA/MTA.h" #include "MTA/LockAnalysis.h" #include "Util/SVFUtil.h" #include "Util/PTAStat.h" using namespace SVF; using namespace SVFUtil; /*! * Constructor */ MHP::MHP(TCT*...
ALGO
0.984774
3.954289
e9013ac7-d8d6-4b1a-b2f0-2881e1d4f689
C-2023-4-6/8209230610zhaoyangyi
赵洋毅的C++实验/实验四(5).cpp
#include<iostream> #include<cstring> using namespace std; int indexOf(char* s1, char* s2); int main() { const int size = 999; char s1[size], s2[size]; cin.getline(s1, size); cin.getline(s2, size); cout << "indexOf(\"" << s1 << "\", \"" << s2 << "\") is " << indexOf(s1, s2) << endl; return 0; } int indexOf(c...
ALGO
0.999789
3.873877
94190a0a-a3d9-43c3-8425-33a193ff9b93
ajaybir17/ajaybirpaarallelassignment
ass1ALLquestions.cpp
#include <mpi.h> #include <iostream> #include <cstdlib> // For rand() and srand() #include <ctime> // For seeding random number generator #define MIN_POSITION 0 // Minimum position in the domain #define MAX_POSITION 100 // Maximum position in the domain #define NUM_WALKERS 5 // Number of walkers per process #...
ALGO
0.999987
5.727017
ac282033-28f1-45c4-bd8d-fd8bad251520
anprottush/Programming
All/C++/LAB 1/task 5.cpp
#include <iostream> using namespace std; class number { private: int x,i; public: void display() { cout<<"enter number: "; cin>>x; cout<<"Enter elements: "; for(i=1;i<=x;i++) { cin>>i; } for(i=1;i<=x;i++) { cout<<" "<<i;...
ALGO
0.98434
3.457973
98f2bbbc-1f46-4af3-8e57-18161f7ec214
shivanibhat24/CPP-Programs
Leetcode Programs/dinnerplatestacks.cpp
class DinnerPlates { public: DinnerPlates(int capacity) : capacity_(capacity) {} void push(int val) { if (not_full_stacks_.empty()) { not_full_stacks_.push(stack_positions_.size()); } auto current_stack = not_full_stacks_.top(); while (stack_positions_.size() <= c...
ALGO
0.996186
5.828799
d9c51657-b6ee-4282-87c2-1ffcfb5c455b
kunalrana9458/cpp_dsa_supreme
Recursion/class/class-2/printOddNumbers.cpp
#include<iostream> using namespace std; void printOddNumbers(int arr[],int index,int size){ if(index >= size) return ; if(arr[index]&1) cout << arr[index] << " "; printOddNumbers(arr,index+1,size); } int main() { int size=6; int arr[size] = {10,11,12,15,54,45}; int index=0; printOddNumbers(a...
ALGO
0.999635
4.571035
62853c81-3741-4ff1-8421-61c0c2bd6275
sampritipanda/IOI_Repository
Codeforces/8VC_Elimination/C.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { int A, B; cin >> A >> B; int N = A, M = B; int max_a, max_b; for(max_a = 1; true; max_a++) { if(max_a % 6 == 0) { if(N > M) N--; else M--; } else if(max_a % 3 == 0) { if(M > 0) M--; } else if(max_...
ALGO
0.999941
4.019391
a219f490-4a02-4ef3-a1a5-92d79f900121
ailab-hanyang/Radar4VoxMap
thrid_party_library/g2o/g2o/examples/sphere/create_sphere.cpp
#include <iostream> #include <fstream> #include <vector> #include <cmath> #include <Eigen/Core> #include <Eigen/StdVector> #include "g2o/types/slam3d/vertex_se3.h" #include "g2o/types/slam3d/edge_se3.h" #include "g2o/stuff/sampler.h" #include "g2o/stuff/command_args.h" #include "g2o/core/factory.h" using namespace s...
ALGO
0.998762
5.894899
96728416-b7dd-460d-9989-4a676fc3409d
JensenWei007/Parallel-Programming-Design
Final/normal_ARM.cpp
#include <iostream> #include <fstream> #include <vector> #include <sys/time.h> #include <ctime> #include <cmath> #include <math.h> #include <string> #include <string.h> #include <sstream> #include <algorithm> #define MAXSIZE 2000 typedef long long ll; using namespace std; class index { public: int len = 0; vector<uns...
ALGO
0.99472
3.430938
810f58eb-dbed-4c05-b4da-9fca96d57551
rizalfahlevi8/cek-username-dan-password
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
cbdb3b94-e861-4971-943e-578651371d6d
guptaanmol184/OOAD-LAB-2017
lab7/C3_C4/main.cpp
#include <iostream> using namespace std; #include "./graphs.cpp" int allVisited(int *visited,int no_vertices); int getUnvisited(int *visited,int no_vertices); void markAllVisited(int *visited,int no_vertices, traversalTree bfs_tree); main() { graph G; //G.print_adjacency(); int C4exist=0,C3exist=0; int no_vert...
ALGO
0.995104
3.917037
700ce318-d05d-479a-8838-d5e33d1be793
zhu12345618/FirstTriangle
cocos2d/cocos/base/ccUtils.cpp
#include "base/ccUtils.h" #include <cmath> #include <stdlib.h> #include "base/CCDirector.h" #include "base/CCAsyncTaskPool.h" #include "base/CCEventDispatcher.h" #include "base/base64.h" #include "renderer/CCCustomCommand.h" #include "renderer/CCRenderer.h" #include "renderer/CCTextureCache.h" #include "platform/CCI...
TOOL
0.930756
6.056654
c784c798-0086-4a4f-b169-693bd8b6fee9
mihailovy/ads-12
graph/graph-search/deikstra.cpp
#include <stdio.h> /* Максимален брой върхове в графа */ #define MAXN 150 #define MAX_VALUE 10000 #define NO_PARENT (unsigned)(-1) /* Брой върхове в графа */ const unsigned n = 10; // Брой на вяърховете в графа const unsigned s = 1; // Фиксиран връх, от който ще търсим път до останалите върхове /* Матрица на тегла...
ALGO
0.999977
3.816406
1c9bffab-abc7-47b9-a028-b5e37daf4cf3
carrtesy/Problem-Solvings
bkj/11650/11650.cpp
#include <iostream> #include <algorithm> using namespace std; class coord{ public: int x; int y; coord(){ x = 0; y = 0; } coord(int _x, int _y){ x = _x; y = _y; } bool operator<(coord c) const{ if(x == c.x){ return y < c.y; } ...
ALGO
0.999199
4.563643
82d922e2-0bd2-4932-bf36-4b5be14bf4f2
easonlee2004/DataStructure-Algorithms
selection_sort/main.cpp
#include <bits/stdc++.h> using namespace std; const int N = 10000; int n; int a[N]; void selection_sort() { // 当前排第i个元素,遍历i+1到n-1找到最小j。如果不在i位置则swap // 只需要排n-1次。最后一位一定是最大值 for (int i = 0; i < n - 1; i++) { int min = i; for (int j = i + 1; j < n; j++) if (a[j] < a[min]) ...
ALGO
0.999773
4.05886
b6ac6809-55b8-499c-91bc-d1685cb5875f
Easonchen1118/OOP_ITSA
OOP_Extra_simple08.cpp
#include <iostream> using namespace std; int main(){ int number; bool isPrime = true; cin >> number; for (int i=2; i< number; i++) { if (number % i == 0) { isPrime = false; break; } } if (isPrime == true) { cout << "YES" << endl; } else { ...
ALGO
0.999895
5.038654
9f9c1098-a301-4826-aae4-76b8917caf04
mahim007/Online-Judge
codeforces/B. New Year and Old Property.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int int main(){ ll cnt=0,a,b,i,j,d; cin>>a>>b; for(i=0;(1LL<<i)/2<=b;i++){ for(j=0;j<=i-2;j++){ d=(1LL<<i)-1-(1LL<<j); if(d>=a && d<=b) cnt++; } } cout<<cnt<<endl; return 0; }
ALGO
0.999369
3.743785
954855b1-97e1-415c-b8cb-8d6b166a0efb
FirasKhurshid1/DAA
LCS.cpp
// Recursion // A Naive recursive implementation of LCS problem #include <bits/stdc++.h> using namespace std; // Returns length of LCS for X[0..m-1], Y[0..n-1] int lcs(string X, string Y, int m, int n) { if (m == 0 || n == 0) return 0; if (X[m - 1] == Y[n - 1]) return 1 + lcs(X,...
ALGO
0.999967
6.027227
eb79ca2b-afe7-4263-ab6e-a9e1b3fb1ac6
Dong-Uri/Algorithm
250228/전화번호 바꾸기/change-phone-number.cpp
#include <iostream> using namespace std; int main() { // Please write your code here. int x, y, a; char b; cin >> a >> b >> x >> b >> y; cout << "010-" << y << "-" << x; return 0; }
ALGO
0.981574
3.299658
a6b85c81-ab3e-4a11-ae8d-1081376bf72a
HansKristian-Work/dxil-spirv
third_party/glslang-spirv/InReadableOrder.cpp
// The SPIR-V spec requires code blocks to appear in an order satisfying the // dominator-tree direction (ie, dominator before the dominated). This is, // actually, easy to achieve: any pre-order CFG traversal algorithm will do it. // Because such algorithms visit a block only after traversing some path to it // from ...
ALGO
0.998278
7.774772
b6c8a46f-c76c-40eb-9144-66ea6a98a655
raincross7/code-similarity
codes/train_code/problem064/problem064_294.cpp
///AJoy Sarker ,CSE JAHANGIRNAGAR UNIVERSITY 48 Batch #include<bits/stdc++.h> using namespace std; #define SORT(c) sort((c).begin(),(c).end()); #define pb push_back #define MP make_pair #define pii pair<int,int> #define pcc pair<char,char> #define pic pair<int,char> #define pci pair<char,int> #define VS vector<string> ...
ALGO
0.999928
3.613536
d4ccef1c-922d-4b2b-8dd7-f06ee8c35ae9
leslieyip02/leetcode
completed/2799.cpp
class Solution { public: int countCompleteSubarrays(vector<int>& nums) { unordered_set<int> distinctElements; for (int num : nums) { distinctElements.insert(num); } int left = 0; int right = 0; int count = 0; unordered_map<int, int> currentElement...
ALGO
0.999922
6.483306
e7009c5f-78f3-493f-8974-6b7ceca01fbb
TreeSkyx/CE-BOOSTUP-9
kidmaiook.cpp
#include <stdio.h> #include <math.h> int main(){ int a,b,sum=0; scanf("%d %d",&a,&b); sum = a+b; if(sum!=0) { int nDigits = floor(log10(abs(sum))) + 1; printf("%d",nDigits); } else printf("%d",1); return 0; }
ALGO
0.999486
3.717909
80c4fb8e-b29f-4c85-8c9f-2888cecbfa79
NameLessJedi/framework_base
media/libstagefright/codecs/aacdec/hufffac.cpp
/* Pathname: ./src/hufffac.c Funtions: hufffac ------------------------------------------------------------------------------ REVISION HISTORY Description: Modified from original shareware code Description: Modified to pass variables by reference to eliminate use of global variables. Des...
ALGO
0.999424
6.430254
c921f201-e25c-49ec-bacc-0bb9d9896840
asdf1229/maximum-signed-kplex
main.cpp
#include "Graph.h" #include "Utility.h" using namespace std; // Usage: [0]exe [1]input_graph [2]k int main(int argc, const char *argv[]) { if (argc < 2) { cout << "\t Usage: [0]exe [1]input_graph [2]k" << endl; exit(1); } string file_path = argv[1]; ui K = atoi(argv[2]); if (K < ...
ALGO
0.999094
4.006836
27d60523-5a19-4503-9026-b4dc06bae386
quan2k5/tree_graph
tree_graph/cau2.cpp
#include<stdio.h> #include<stdlib.h> # define MAX 5 // c?u trc d? li?u cho nut typedef struct Node{ int data; struct Node* left; struct Node* right; }Node; // kh?i t?o ra 1 nt Node* createNode(int data){ // kh?i t?o b? nh? d?ng b?ng malloc Node* newNode = (Node*) malloc(sizeof(Node)); newNode->...
ALGO
0.999959
4.359939
9a977b65-58e9-4c17-aaa6-70f2da783223
Chenchen12138/Backup_for_Data_structure_and_Cplusplus
汉诺塔.cpp
#include <stdio.h> #include <Windows.h> void move(int plate, char poleStart, char poleGoal) { static int i = 0; printf("[%d]\t%d:%c->%c\n", ++i, plate, poleStart, poleGoal); } void hanoi(int n, char poleStart, char poleTemp, char poleGoal) { if (n == 0) return; hanoi(n - 1, poleStart, poleGoal, poleTemp); move(n, ...
ALGO
0.999702
4.022377
b26cbc59-6384-4223-a61b-4231c9026f68
alexei-tchervinsky/tp_2024
lin.zedong/T3/functions.cpp
#include "functions.hpp" #include <numeric> #include <functional> #include <cmath> #include <algorithm> #include <limits> #include <iomanip> #include <exception> #include <iterator> namespace geometry { std::istream &operator>>(std::istream &in, DelimiterIO &&dest) { std::istream::sentry sentry(in); ...
ALGO
0.993312
4.224796
69cd306d-200c-496f-855e-d34fa6637371
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_9915_13.cpp
#include <bits/stdc++.h> using namespace std; using namespace std::chrono; using ii = pair<long long int, long long int>; class prioritize { public: bool operator()(ii &p1, ii &p2) { return p1.first < p2.first; } }; auto start_time = high_resolution_clock::now(); void time() { return; } void ojudge() { ios_base::s...
ALGO
0.999975
4.217275
0d8d1d30-d24b-44a0-8e73-148c504ec9d1
Prakashsaw/DSA_Problem_GFG_and_Leetcode
DSA_Problem_On_GFG/Arrays/maximum triplets product.cpp
/* Q_Name:- Maximum Triplet product. Platform:- gfg Difficulty:- Medium Q_Description:- Given an array arr of size n, the task is to find the maximum triplet product in the array. Example 1: Input: n = 4 arr[] = {1, 2, 3, 5} Output: 30 Explanation: 5*3*2 gives 30. This is the maximum possible triplet product in ...
ALGO
0.999866
5.770742
904c8cb8-b420-4f22-8d3a-112a5fb58fe8
SujayVivek/Ok-lets-CP
1200-1400/Dump1/B_Make_It_Ugly.cpp
#include <bits/stdc++.h> using namespace std; // _______ _ _ _ _ __ _ _ _ // |__ __| | (_) | | (_) / _| | | | | (_) // | | | |__ _ ___ ...
ALGO
0.99992
4.411221
16e7b7fc-a3d2-46f3-92d4-b1708a9ae9dc
zivf23/trie-tree
main.cpp
/******************* ziv farajun 323920603 mivne natonim exe 3 ******************/ #include <iostream> #include <list> #include <string> #include "trie.h" using namespace std; int main() { char ch; string wrd; Trie tr; int comp; cout << "\nTRIE PROGRAM" << endl; cout << "\nChoose one of the following" <<...
ALGO
0.95977
3.83296
d030ab87-c776-473f-b38b-6f2481855d6f
OmarAlSeddik/competitive-programming-codeforces
800/choosing-teams.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, k, count = 0; cin >> n >> k; for (int i = 0; i < n; i++) { int x; cin >> x; if (x <= 5-k) count++; } cout << count / 3; return 0; }
ALGO
0.999911
4.086852
1edb8011-f944-4a54-8706-bb4e513873bc
ishandutta2007/codeforces
wzyyn/normal/1604/C.cpp
#include<bits/stdc++.h> using namespace std; const int N=200005; int n,a[N]; void solve(){ scanf("%d",&n); for (int i=1;i<=n;i++) scanf("%d",&a[i]); bool flag=1; for (int i=1;i<=n&&i<=25;i++){ bool ok=0; for (int j=2;j<=i+1&&j<=25;j++) if (a[i]%j) ok=1; if (!ok) flag=0; } puts(flag?"YES":"NO"); } int...
ALGO
0.999168
4.198723
5d6dbf19-1899-4047-8274-582dc0840a0a
pdrabik223/data-protection
primes/primes.cpp
// // Created by piotr on 29/03/2022. // #include <cmath> #include <cstdint> #include <iostream> #include "test.h" // using Int = unsigned long long; bool BruteForceIsPrime(uint64_t value) { double limit = sqrt(value); for (int i = 2; i <= limit; i++) if (value % i == 0) return false; return true; } uint64_t ...
ALGO
0.994934
4.467181
7163fd69-d360-42a6-8e18-a6fd61f784ef
ishandutta2007/codeforces
itst/normal/859/A.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int maxN = 0 , N; cin >> N; for(int i = 1 ; i <= N ; i++){ int a; cin >> a; maxN = max(maxN , a - 25); } cout << maxN; return 0; }
ALGO
0.99565
3.030021
f21ef4d6-41d7-4999-ac29-275326e06cf0
Polina-Eremeeva29/Labs_PSTU
Лабораторная работа №23/LR23/LR23/main.cpp
#include <iostream> #include "Vector.hpp" using namespace std; int main() { setlocale(LC_ALL, "ru"); cout << "Создаем контейнер A с 5 элементами:\n"; Vector a(5); cout << a << "\n"; cin >> a; cout << a <<"\n"; cout << "Элемент с индексом 2 равен 100:\n"; a[2] = 100; cout << a << "\n...
TOOL
0.930079
3.360714
e0e82a5d-5a3e-4f38-9fb4-8208797a910b
hoshinon57/Algorithm
AtCoder/ABC301-400/ABC341-350/ABC343-E.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <iomanip> using namespace std; typedef long long ll; const ll INF64 = 1LL << 60; const int INF32 = 0x3FFFFFFF; // =(2^30)-1 10^9より大きく、かつ2倍しても負にならない数 template<class T> inline bool chmin(T &a, T b) { if(a > b) { a = b; return true; } re...
ALGO
0.999732
4.798774
e3ddc405-29b3-4966-a4b5-39aad6984fbd
luqiang21/Exercises-CarND
term-2/CarND-MPC-Quizzes-master/global_kinematic_model/src/Eigen-3.3/bench/product_threshold.cpp
#include <iostream> #include <Eigen/Core> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; #define END 9 template<int S> struct map_size { enum { ret = S }; }; template<> struct map_size<10> { enum { ret = 20 }; }; template<> struct map_size<11> { enum { ret = 50 }; }; template<> struct ...
TOOL
0.917044
5.102006
4a7b055f-825e-4f88-b9cc-6f36eab9f6bf
SupremeWarrior108/Competitive-Programming
CodeChef/ZCO-INOI Practice Set/ZCO Problem/IPL.cpp
// https://www.codechef.com/practice/course/zco-inoi-problems/ZCOPRAC/problems/ZCO14002?tab=statement #include <bits/stdc++.h> using namespace std; // Macros #define pb push_back #define pf push_front #define ff first #define ss second #define all(v) v.begin(), v.end() #define...
ALGO
0.999972
4.39091
06538e7b-0c6f-4b43-a8c9-f5650b2592bb
bandhansaha2/XPSC-Level-2
Week 15/Day 1/A_Brogramming_Contest.cpp
#include <bits/stdc++.h> #define ll long long #define endl '\n' #define all(x) x.begin(),x.end() #define Yes cout << "YES" << '\n' #define No cout << "NO" << '\n' using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while(t--) { int n; string s;...
ALGO
0.999959
4.167615
8a3e1edf-618c-4eb3-bc9d-52b59cb3c22f
ishandutta2007/codeforces
wsyhb/normal/1684/F.cpp
#include<bits/stdc++.h> using namespace std; int n,m; const int max_n=2e5+5; int a[max_n],Hash[max_n],rm[max_n]; vector<int> pos[max_n]; namespace ST { int Log[max_n],f[18][max_n]; inline void init() { Log[0]=-1; for(int i=1;i<=n;++i) { Log[i]=Log[i>>1]+1; f[0][i]=rm[i]; } for(int i=1;i<=Log[n];++i) ...
ALGO
0.999967
4.585797
d6164588-32f0-482c-9035-cd53fec087a9
k0278kim/kkulgom
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.998693
6.797273
cd8293d7-f079-4c03-b142-1d4f6f8093b5
khalid2696/AutopilotFlightController
Firmware/simulation/Support Files/eigen-eigen-67e894c6cd8f/doc/examples/TutorialLinAlgInverseDeterminant.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix3f A; A << 1, 2, 1, 2, 1, 0, -1, 1, 2; cout << "Here is the matrix A:\n" << A << endl; cout << "The determinant of A is " << A.determinant() << endl; cout << "The inverse of A is:\n...
ALGO
0.999638
4.186114