uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
8452bd92-c0cd-46ea-a8c3-9d68cbbd27fa
ShikharS1411/CF
Rat in a maze(gfg).cpp
class Solution{ vector<string> ans; void recursion(int i, int j, string path, vector<vector<int>> &matrix, int row, int column) { if(i < 0 or i >= row or j < 0 or j >= column) //checking out of bound conditions { return; } if(matrix[i][j] == 0) //this is to avoid...
ALGO
0.999955
6.550406
592514bf-0811-4ec4-98f6-35cf385e56a6
raincross7/code-similarity
codes/train_code/problem072/problem072_458.cpp
#include <bits/stdc++.h> const long long INF = LLONG_MAX / 2; const long long MOD = 1000000007; const long double PI = 3.1415926; #define FOR(i, r, n) for(int i=(ll)(r); i<(ll)(n); i++) #define REP(i, n) FOR(i, (0), n) #define ll long long int using namespace std; ll ans = 0, sum = 0, n, k, counter = 0, w, h; string s...
ALGO
0.99999
3.348791
c4c6a607-46ae-4b2b-b88e-62e3ab47f4a7
Sur818/Coding-Projects
CppCompiler/class and object (12).cpp
#include<iostream> using namespace std; class sumoftwono { private: int a,b; public: void sum(int x,int y) { cout<<"sum of both no:-"<<x+y; } public: void setter(int x,int y) { a=x; b=y; } }; int main() { int a,b; sumoftwono obj; cout<<"enter first no:-"; cin>>a; cout<<"enter second no:-"; cin>>b; obj.sum(a,b); }
TOOL
0.959061
4.178924
bd6bf307-c80a-41be-8550-f9f1538ce448
Akhilleshgoswami/DataStructures-And-Algorithms
rootenorange.cpp
// class Solution { // public: // int orangesRotting(vector<vector<int>>& grid) { // queue<pair<int, int>> rotten; // int r = grid.size(), c = grid[0].size(), fresh = 0, t = 0; // for(int i = 0; i < r; ++i){ // for(int j = 0; j < c; ++j){ // if(grid[i][j] == 2) rot...
ALGO
0.999954
5.570552
8872f43e-291c-48dd-92b9-1e5b9e244795
daniel-elesbao/POO2025Q2
C++/011. Caracteres/Caracteres.cpp
#include <iostream> int main() { char A; char B; char C; std::cin >> A >> B >> C; std::cout << A << std::endl << B << std::endl << C << std::endl; return 0; }
ALGO
0.980282
3.684714
3829fc28-3710-4ebc-8c15-cd202a72a96f
shristysingh996/cpp-program
Implementation of Polynomial Class.cpp
#include <iostream> #include <vector> using namespace std; class Polynomial { private: vector<int> coefficients; // Stores the coefficients of the polynomial public: // Constructor to initialize the polynomial with a given list of coefficients Polynomial(vector<int> coeffs) { coefficients = coeffs...
ALGO
0.99962
5.555025
3b99f9ee-5c67-49a2-96ef-4f2f4b68414d
Khuslee2134/flutter_summer_course_tornado
wordfind_app/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.998687
6.76073
893cc012-e818-4267-99e7-638eb0720bd9
Jaswant1907/instataskapp
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.998733
6.76775
6a938b01-2023-4d38-8057-fd04fb591950
aniket-2003-das/GFG-Problems
Day9_Print_N_to_1_without_loop.cpp
class Solution { public: // Resursion By not Declaring Count. start print and then iterate Iterate N to 1 to print numbers. void printNos(int N) { // code here if (N==0) return; cout << (N) << " "; printNos(N-1); } };
ALGO
0.999719
5.527592
7c64b3a5-011e-4e60-b4dd-3908637debb2
dilevin/CSC417-a6-rigid-body-contact
extern/libigl/include/igl/edge_topology.cpp
template<typename DerivedV, typename DerivedF> IGL_INLINE void igl::edge_topology( const Eigen::PlainObjectBase<DerivedV>& V, const Eigen::PlainObjectBase<DerivedF>& F, Eigen::MatrixXi& EV, Eigen::MatrixXi& FE, Eigen::MatrixXi& EF) { // Only needs to be edge-manifold if (V.rows() ==0 || F.rows()==0) { ...
ALGO
0.992544
5.206831
9d50bf48-f3e5-4768-8062-6935c9f8a505
Niladree60/LeetCodeSolutions
LeetCode2433.cpp
class Solution { public: vector<int> findArray(vector<int>& a) { vector<int> ans; int n = a.size(); ans.push_back(a[0]); for(int i = 1 ; i < n ; i++) { int x = a[i-1]^a[i]; ans.push_back(x); } return ans; } };
ALGO
0.999993
4.861865
bdf2dc60-f80b-45b6-9342-7d158a8e39d8
ishandutta2007/codeforces
huangxiaohua/normal/1627/F.cpp
#include<bits/stdc++.h> using namespace std; int i,j,k,n,m,t,a,b; bool vis[505][505]; map<tuple<int,int,int,int> ,int>mp; vector<pair<int,int> > d={{0,1},{0,-1},{-1,0},{1,0}}; struct sb{ int x,y,w; bool operator<(const sb a)const{return w>a.w;} }; int main() { ios::sync_with_stdio(0); cin>>t; while(t--){ cin>>m>...
ALGO
0.999936
4.100438
2c1a0f39-e8e0-4c87-8754-a0de02262763
legnaleurc/junkcode
algorithm/leetcode/26.cpp
class Solution { public: int removeDuplicates(vector<int>& nums) { if (nums.empty()) { return 0; } int b = 0; int e = 0; while (e < nums.size()) { while (e < nums.size() && nums[b] == nums[e]) { ++e; } if (e >= n...
ALGO
0.999942
6.481499
f9f09fcb-93a4-4404-b1be-e018d2121bda
lzy960601/Google_Coding_Competitions
CodeJam/2021/2021Round2/C.cpp
/***************************************** Author: lizi Email: <EMAIL> Date: 2021-05-15 File: C.cpp *****************************************/ #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx") #include<bits/stdc++.h> using namespace std; const double eps = 1e-10; const do...
ALGO
0.999899
4.045992
a5462283-a612-4712-bfff-dce82e823969
snuzero2020/zero
slam/src/lane_matching/lane_matcher.cpp
#include "ros/ros.h" #include "ros/package.h" #include "std_msgs/String.h" #include <opencv2/core/core.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/optflow.hpp> #include <iostream> #include <sstream> #include <vector> #include <cstdlib> #include <ctime> using nam...
ALGO
0.997144
4.26235
51caf2b7-e9fd-405a-bf8e-865a9d63ca8a
MohammadAbduljalil/EOI-Newbies
Day 11/Practice/B. Count characters.cpp
#include <iostream> #include <bits/stdc++.h> #include <string> using namespace std; int main() { string s; cin >> s; int arr[123] = {}; for (int i = 0; i < s.length(); i++) { arr[int(s[i])]++; } for (int i = 65; i < 123; i++) { if ((i > 90) && (i < 97)) continue;...
ALGO
0.990177
3.30096
717c437c-b069-4225-8521-a760900dc850
squaresLab/BatFix
results/transcoder-st/results/python/syntax/PROGRAM_PAGE_REPLACEMENT_ALGORITHMS_SET_2_FIFO.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <vector> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <numeric> #include <algorithm> using namespace std; int f_gold ( int pages [ ], int n, int capacity ...
ALGO
0.99975
5.47015
5c814bcf-e4c1-4f95-ae8d-5fe53d46290d
team3hailong/SPOJ-PTIT
P157PROA/newbie_0_2.cpp
// Online C compiler to run C program online #include <stdio.h> #include <stdlib.h> int main() { int l; scanf("%d", &l); while(l--){ int n; scanf("%d", &n); if(n==0) printf("0\n"); else{ int a[n], dem[1002]={0}; int max=-1e9; for(int i=0; i<n; i++){ ...
ALGO
0.999991
3.76203
8f5e74a1-b5cb-41a1-9d2c-4585bcbeb000
over-fitted/CP
Kattis/success/sok/sok.cpp
#include <bits/stdc++.h> using namespace std; #define ar array #define ll long long #define ld long double typedef vector<int> vi; typedef pair<int,int> pi; #define sza(x) ((int)x.size()) #define all(a) (a).begin(), (a).end() #define REP(i,a,b) for (int i = a; i < b; i++) #define ITER(x) for (int i = 0; i < x; i++) #...
ALGO
0.999224
3.600793
2b7710fd-d9c6-452f-bc14-2d07bee02657
s417-lama/ppopp21-preemption-artifact
lammps/lib/gpu/lal_lj.cpp
/*************************************************************************** lj.cpp ------------------- W. Michael Brown (ORNL) Class for acceleration of the lj/cut pair style. ______________________________________________...
ALGO
0.980055
5.903935
2a3ddea9-6228-4055-b7de-e26043061767
Jackelin999/Frontend
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.998756
6.772262
4cb06cbd-e056-429e-9a3d-728b76c6917b
jhpark555/dsa_cpp
completeTree.cpp
#include <iostream> #include <vector> #include <list> using namespace std; template <typename E> class VectorCompleteTree { // left-complete tree interface private: // member data vector<E> V; // tree contents public: // publicly accessible types typedef typename vector<E>::iterator Position...
ALGO
0.998719
4.738697
f7b14028-9add-4173-bee4-b3086be7ef2d
eriolnik/BMSTU-LAB-4
lab-04-functions-eriolnik/sources/source.cpp
#include <header.hpp> #include <vector> float mean(const std::vector<float> &v) { float sum = 0.; for (float value : v) { sum += value; } return !v.empty() ? sum / v.size() : 0; }
TOOL
0.936327
5.181045
040ee02a-d10b-4f25-a020-12c14e865368
ganesh1151/DSA-using-C-
Greedy/cpp_implementation_of_huffman_coding.cpp
// C++ program for Huffman Coding with STL #include <bits/stdc++.h> using namespace std; // A Huffman tree node struct Node { // One of the input characters char data; // Frequency of the character unsigned freq; // Left and right child Node *left, *right; Node(char data, unsigned freq, Node* l = NULL, Node...
ALGO
0.999945
5.465572
021fc644-347c-403a-8e00-121dbecb6a91
ggace/winter_mogakso
algorithm/baekjoon/11778/solution.cpp
typedef long double ld; typedef long long ll; typedef unsigned long long ull; #define pii pair<int, int> #define pll pair<ll, ll> #define PRIME_SIZE 5 #define PIE M_PIf64 #ifdef BOJ #define debug(x) ((void)0); #define debug_value(x) ((void)0); #define fio cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(false); #el...
ALGO
0.999981
4.533207
7960ea25-a078-4203-a2d4-ae93d25fcbda
BHOJANE-VARUN/MyVscode
DSA/dsa450/array/3sum.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<int>> threesum(vector<int> &temp, int n, int t) { set<vector<int>> ans; for (int i = 0; i < n-2; i++) { for (int j = i + 1; j < n-1; j++) { for (int k = j + 1; k < n; k++) { vector<int> tar; i...
ALGO
0.999421
4.392738
2848033a-4592-409f-9515-a52ee44cd891
Pratyushkyadav/Competetive-Programming
Codeforces/1931E - Anna and the Valentine's Day Gift.cpp
//<---------- Author - Pratyushdumdumb -----------> #pragma GCC optimize("O3,inline,unroll-loops,fast-math") #pragma GCC optimize("aggressive-loop-optimizations") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #defi...
ALGO
0.999826
6.404775
48c4b194-144c-4804-b4bd-c52d58e46134
SwindleA/LLMCodeObfuscation
Base_Code/B11.cpp
#include <iostream> #include <vector> #include <algorithm> int main(){ std::vector <char> vowels = {'a','e','i','o','u'}; std::string word = "alphabet"; int number_of_consonant = 0; for(int i =0; i<word.size(); i++){ if( std::find(vowels.begin(),vowels.end(),word[i]) == vowels.end()){ ...
ALGO
0.99333
4.496614
273ba1bf-8ef1-443c-952f-50e1debc60d3
Ranger-boop/velodep
src/c_api.cpp
#include <stdexcept> #include "c_api.h" #ifdef __cplusplus extern "C" { #endif RsfTauFix* new_RsfTauFix( double a, double b, double Dc, double alpha, double mu_0, double v_0, double disp_0, const double sig_n[], size_t num_sig_n, const double pp[], size_t num_pp, const double t[], size_t num_t )...
TOOL
0.903771
6.905691
a40374d6-8d7d-4d25-ad31-3d48bac3c632
giongto35/CompetitveProgramming
D276.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> #include <ctime> #include <que...
ALGO
0.999944
3.258531
22d0d13b-9f10-4eab-86f9-ae0b7f7ee118
mukeshk05/Real-Self-Driving-Car
ros/src/waypoint_follower/lib/libwaypoint_follower.cpp
#include "libwaypoint_follower.h" int WayPoints::getSize() const { if (current_waypoints_.waypoints.empty()) return 0; else return current_waypoints_.waypoints.size(); } double WayPoints::getInterval() const { if (current_waypoints_.waypoints.empty()) return 0; // interval between 2 waypoints t...
ALGO
0.992844
4.499809
2b34b3c6-fc5d-40e8-8b19-9e6d92262fbc
Rajsree/CodeIt
problems/find_duplicate_subtrees/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.999916
6.050291
916078e2-4c39-4e69-a5db-2ecd290a9405
ishandutta2007/codeforces
mangooste/normal/1380/G.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define all(a) begin(a), end(a) #define rall(a) rbegin(a), rend(a) #define len(a) ((int)((a).size())) template<typename A, typename B> ostream& operator<<(ostream &out, pair<A, B> p) { return out << '(' << p.first << ", " << ...
ALGO
0.999966
4.330352
758700ae-0b95-44b7-b06d-dab8a3474d21
tsssni/data-structure
Bellman_Ford.cpp
#include<bits/stdc++.h> using namespace std; struct edge{ int to,cost; }; vector<edge> g[1000005]; int dist[1000005]; bool bellman_ford(int n){ for(int i=0;i<=n;i++) dist[i]=0xfffffff; dist[0]=0; for(int t=1;t<=n;t++){ bool relax=1; for(int i=0;i<=n;i++) for(int j=0;j<g[i].size();j++){ int next=g[i][j]...
ALGO
0.999899
4.247532
35968d0d-9607-466a-bd07-cef30fa2aabc
shubhdevv/roadToExpert
1200/alternatingSubsequence.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; # define M_PI 3.14159265358979323846 bool sign(ll num){ return num>0; } void solve() { ll n; cin>>n; vector<ll>arr(n); for(int i=0;i<n;i++)cin>>arr[i]; ll ans = 0; ...
ALGO
0.999883
4.438785
c982d5ce-4dfc-4be6-b0ec-1b0bd0ce112e
moonjinhwan/Algorithm-Code-Up
back_Joon/스택,큐/1406 에디터.cpp
#include<iostream> #include<stack> #include<string> using namespace std; void solve() { string s; cin >> s; int n; cin >> n; stack<int> st; for (int i = 0; i < n; i++) { char cmd; cin >> cmd; if (cmd == 'P') { char temp; cin >> temp; s.push_back(temp); } else if(cmd=='L'){ if (s.size() != 0) { ...
ALGO
0.999845
3.745221
c6c21067-4348-4ea5-9e08-863119a483f6
giuliano-97/fracture_sim
libigl/python/py_igl/py_shape_diameter_function.cpp
m.def("shape_diameter_function", [] ( const Eigen::MatrixXd& V, const Eigen::MatrixXi& F, const Eigen::MatrixXd& P, const Eigen::MatrixXd& N, const int num_samples, Eigen::MatrixXd& S ) { return igl::shape_diameter_function(V, F, P, N, num_samples, S); }, __doc_igl_shape_diameter_function, py::arg("V"), p...
ALGO
0.98564
6.14095
59ad0dfe-6bbe-42ae-994e-dad3817c32cc
ngwoon/Algorithm
BOJ/2748 - 피보나치 수 2.cpp
#include <bits/stdc++.h> using namespace std; long long fibo[91]; int main(void) { int n; scanf("%d", &n); fibo[0] = 0; fibo[1] = 1; for(int i=2; i<=n; ++i) fibo[i] = fibo[i-1] + fibo[i-2]; printf("%lld", fibo[n]); }
ALGO
0.999991
4.627381
e6a9686e-cfa6-4e1c-aa69-de96ad810aa5
jirayu123za/Lab_26
lab26_2.cpp
#include<iostream> #include<list> #include<algorithm> using namespace std; void printList(list<string> s) { list<string>::iterator i; for (i = s.begin(); i != s.end(); i++) { cout << *i << " "; } cout << "\n"; } int main() { list<string> line_up; list<string>::iterator loc; line_up.push_back("Alice"); li...
TOOL
0.986648
3.875529
bf796656-b708-4603-9f75-f55855322936
moriya1232/Algorithms
Astar.cpp
// // Created by shilo on 24.1.2020. // #include "Astar.h" #include "PriorityQueueAstar.h" string Astar::search(Searcheable *problem) { State* s1; auto *openList = new PriorityQueueAstar(); openList->queueAstar->push(problem->getInitialState()); auto *closed = new set<State *>(); while (!openList-...
ALGO
0.999991
4.11068
d67a457b-2cba-4fd0-bfeb-d2eb41fafd59
PYBPYB/OJ_ShuiTi
c++语言文件/1041 计算.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; double mun=0.0; for(int i=1; i<=n; i++)mun += 1.0/i; cout<<setiosflags(ios::fixed)<<setprecision(6)<<mun<<endl; return 0; }
ALGO
0.99976
3.871516
d9bf5443-b984-42d4-8dae-535ad0a83c37
radifkhanrafin/c-plus-plus
Week-1/Module 2.5 Practice Day 01/E_Max.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } int maxi=arr[0]; for (int i = 0; i < n; i++) { maxi = max(maxi, arr[i]); } cout << maxi << " "; return 0; }
ALGO
0.999679
3.961604
b7bad084-38ee-49f0-87bc-edb342caf5c1
paul-nema/hackerrank
ProblemSolving/easy/ElectronicsShop/electronicsShop.cpp
#include <bits/stdc++.h> using namespace std; vector<string> split_string(string); /* * Complete the getMoneySpent function below. */ // b: budget int getMoneySpent(vector<int> keyboards, vector<int> drives, int b) { int bestDeal{ -1 }; int prev{ b }; int remaining; for( auto const keyboard: keyb...
ALGO
0.999942
4.699088
65efbbb1-f59a-40fc-91bf-3f5994556f2d
sky8c9/Prac
AtCoder/ABC/237/E.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; using ll = long long; const ll MAX = 1e18; void task() { int n,m; cin >> n >> m; vector<int> h(n); vector<vector<int>> adjL(n); for(int&val : h) cin >> val; for(int i = 0; i < m; i++) { int u, v; cin >> u >> v; ...
ALGO
0.999962
4.74244
746998e8-7553-43b5-8bd8-9fd18ec26d22
m-irrohas/study-programming
Programming/code/section02/partial_sum.cpp
#include <cstdio> using namespace std; int a[MAX_N]; int n, k; bool dfs(int i, int sum) { if (i==n) return sum == k; if (dfs(i+1, sum)) return true; if (dfs(i+1, sum+a[i])) return true; return false; }
ALGO
0.999859
3.506605
3cb0a602-b5d7-46f1-ac69-86060083c062
abhi-shimpi/LeetcodeDPP
LeetcodeDPP/9Apr.TimeNeedeToBuyTickets/Aproach1.cpp
class Solution { //Approach-1 (Using Queue to simply simulate the operations) //T.C : O(n*m) -> Loop runs intil queue is empty and in worst case all people have maximum m tickets //S.C : O(n) public: int timeRequiredToBuy(vector<int>& tickets, int k) { queue<pair<int,int>> que; int time = 0; ...
ALGO
0.999981
6.321026
ba8eeb47-e014-46dc-9446-552c2e51964a
Fneger/BSD_MDVR_UGD
boost_1_77_0/libs/graph/example/straight_line_drawing.cpp
#include <boost/graph/planar_canonical_ordering.hpp> #include <boost/graph/is_straight_line_drawing.hpp> #include <boost/graph/chrobak_payne_drawing.hpp> #include <boost/graph/boyer_myrvold_planar_test.hpp> using namespace boost; // a class to hold the coordinates of the straight line embedding struct coord_t { s...
ALGO
0.996454
7.301219
9a342e6b-f920-49a3-a59f-5311541f7163
Gustavoss181/UFLA
1-Periodo/Introducao aos algoritmos/Lista Avaliativa 2/q03.cpp
#include<iostream> using namespace std; int main(){ const int l=2, c=2, p=3; int n; //alocar int*** m = new int **[l]; for(int i=0; i<l; i++){ m[i] = new int *[c]; for(int j=0; j<c; j++) m[i][j] = new int [p]; } //inserir dados for(int i=0; i<l; i++) ...
ALGO
0.999806
3.426291
6bca3b0b-d0e3-4011-873d-fb1acf25e4b2
alexandraback/datacollection
solutions_1483488_0/C++/BertLeung/c.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> char buffer[20]; int main() { int l, i, a, b, aa, nn, d, t, tt, ans; scanf("%d",&nn); for ( aa = 1; aa <= nn; ++aa) { scanf("%d %d",&a,&b); sprintf(buffer,"%d",a); l = strlen(buffer); if ( l == 1 ) { pri...
ALGO
0.999817
3.735777
938f3284-444b-4804-a118-938b970502a6
fepaf/Competitive-Programming
Tutoria OBI 2020/Aula-25/fenwick-tree-1d.cpp
#include<bits/stdc++.h> #define _ ios_base::sync_with_stdio(0); #define endl '\n' #define INF 0x3f3f3f3f #define MOD 1000000007 #define MAX (1<<20) #define MAXN (1<<10) #define MAXC (1<<10) #define i64 long long #define all(x) (x).begin() , (x).end() #define sz(x) (int)(x).size() #define ii pair<int, int> #define fs fi...
ALGO
0.992756
4.177345
2086b5dc-3730-453b-a788-7b57c4b23713
loqxay/hacktoberfest2022repository
max_queue.cpp
#include <bits/stdc++.h> using namespace std; struct MaxQueue { int plus = 0; deque<pair<int, int>> dq; bool empty() { return (int)dq.size() == 0; } void clear() { plus = 0; dq.clear(); } void add(int x) { // somar x em cada elemento da fila plus += x; } int max() { return dq.b...
ALGO
0.999958
4.464433
f9d441b9-5871-400e-9f03-63a9594b2bce
chunhouliu/algorithms
codeforces/1353b.cpp
#include <cstdio> #include <algorithm> #include <functional> using namespace std; int a[100], b[100]; int main(int argc, char* argv[]) { int t; scanf("%d", &t); while(t>0) { --t; int n, k; scanf("%d%d", &n, &k); for(int i=0; i<n; ++i) scanf("%d", &a[i]); for(int i=0; i<n; ++i) scanf("%d", &b[i...
ALGO
0.999914
3.178325
5325f167-5496-48a0-9f5f-bfadf5bdab16
ishandutta2007/codeforces
couplefire/normal/1342/F.cpp
#pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <bits/stdc++.h> using namespace std; #define INF 0x3f3f3f3f int n; int arr[16]; int dp[1<<15][16][16]; // mask, cnt, pos int sum[1<<15]; vector<int> good; arr...
ALGO
0.999901
4.087695
419a4d82-eb45-41c5-a5bc-f5948863bb75
wykim111/algorithm
Study/2458 키 순서.cpp
/* ÷̵ ͼ ˰ */ #include<iostream> #include<cstdio> #include<algorithm> #define INF 987654321 using namespace std; int N,M; int map[501][501]; int connected[501]; int ret = 0; void init() { for (int i = 1; i <=N; i++) { for (int j = 1; j <= N; j++) { map[i][j] = INF; } } } void Floyed() { //İ ߰ for (in...
ALGO
0.999914
3.785542
24375b2b-dc87-4118-affb-52652a1a39c0
ehnryx/acm
bad_code_from_long_ago/ubcsummer2017/b.cpp
#include <bits/stdc++.h> using namespace std; #define _USE_MATH_DEFINES //#define DEBUG //#define USE_MAGIC_IO #define ll long long #define pii pair<int,int> #define pdd pair<double,double> #define ldouble long double #define nl '\n' const ll MOD = 1e9+7; const int INF = 0x3f3f3f3f; const ll INFLL = 0x3f3f3f3f3f3f3f3...
ALGO
0.999986
3.868433
9793c73b-d9ae-48e6-955e-102e84d284f0
gaikwadshantanu12/adypsoe_aids
SE/DSA_Practicals/Practical No. 06/floyd_warshall.cpp
#include <iostream> using namespace std; // defining the number of vertices #define nV 4 #define INF 999 void printMatrix(int matrix[][nV]); // Implementing floyd warshall algorithm void floydWarshall(int graph[][nV]) { int matrix[nV][nV], i, j, k; for (i = 0; i < nV; i++) for (j = 0; j < nV; j++) ...
ALGO
0.999989
4.401503
220e0831-dc2d-4d2c-b8d2-9daaf193b05e
sakurmoti/atcoder
ABC/340D.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define ALL(x) (x).begin(), (x).end() #define RALL(x) (x).rbegin(), (x).rend() #define REP(i, n) for(int i = 0; i < (n); i++) #define REP2(i, s, n) for(int i = s; i <= (n); i++) int main(){ int N; cin >> N; vector<vector<pair<int, ll>>> G(N+1...
ALGO
0.999823
4.113643
530169a6-390e-4f6a-957a-7aed6d24d3d2
c0rychu/dsa_practice
01_gcd/gcd.cpp
# include <iostream> # include <stdexcept> # include <stdlib.h> int gcdByDef(int a, int b) { int small = a <= b ? a : b; //std::cout << "small: " << small << ", a=" << a << ", b=" << b << std::endl; int ans; for (int i=1; i<=small; ++i) { if ( (a%i == 0) && (b%i == 0) ) { ans = i; ...
ALGO
0.969867
5.734646
9f0e5651-ceba-4449-85c6-5e667e0f0e77
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/10/1004/personal_submission/cf922c_deckedge.cpp
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define ve vector #define all(x) (x).begin(), (x).end() #define rep(i, a, b) for (int i = a; i < b; i++) #define per(i, a, b) for (int i = a; i >= b; i--) using pi = pair<int, int>; using i64 = long long; void solve() { i64 n, k; ...
ALGO
0.999959
3.912883
4d35323a-c59f-46d1-88b8-a29c0ae4bad5
thiphan94/Programming_University-of-Paris
TP2/test.cpp
#include <iostream> #include <array> #include <algorithm> using namespace std; int main(int argc, char**argv) { int j, n,number; std::cout << "How many number?" << std::endl; std::cin >> n; int *table; try {table = new int[n];} catch (bad_alloc& e) { std::cout << "Cannot allocate!" << std::endl; ...
ALGO
0.891776
3.628242
dce2e765-327c-4c92-83ed-f757e9c33ccd
Sumedha-Bajpaii/Daily_Challenge_Solutions
646-maximum-length-of-pair-chain/646-maximum-length-of-pair-chain.cpp
// class cmp{ // bool operator()(vector<int>& a, vector<int>& b){ // if(a[1] < b[1]) return true; // if(a[1] > b[1]) return false; // return a[0] < b[0]; // } // }; bool cmp1(vector<int>& a, vector<int>& b){ if(a[1] < b[1]) return true; if(a[1] > b[1]) return false; return a...
ALGO
0.999991
5.57121
52fc140f-b783-42a9-be87-b2d67d2f133e
vesakaup/algorithm-exercises-cpp
sum.cpp
#include <iostream> using namespace std; int main(){ int n = 0; cin >> n; int lista[n]; if (n !=1 && n<4){ cout << "NO SOLUTION"; } lista[0] =2; lista[n/2+1] = 1; for (int i=1;i<=n/2-1;i++){ lista[i]=lista[i-1]+2; } for (int j=n/2+2;j<n+n;j++){ ...
ALGO
0.999995
3.713521
013c5e1d-5ef2-4090-b013-d566ba360c79
trlste/new-mega-scggm
eigen337/doc/examples/TutorialLinAlgSetThreshold.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix2d A; A << 2, 1, 2, 0.9999999999; FullPivLU<Matrix2d> lu(A); cout << "By default, the rank of A is found to be " << lu.rank() << endl; lu.setThreshold(1e-5); cout << "With threshold 1e-5...
ALGO
0.999901
4.090376
b2955c6d-5dc9-4473-a1b9-89a46969aa5d
RohanS00007/binarysearch
cows.cpp
#include<bits/stdc++.h> using namespace std; bool check(vector<int> &stalls, int k,int dist){ int cowcount=1; int lastcow=stalls[0]; for(int i=1;i<stalls.size();i++){ if(stalls[i]-lastcow>=dist){ cowcount+=1; lastcow=stalls[i]; } if(cowcount>=k) return true; ...
ALGO
0.999921
4.353924
fad927c0-6143-490f-bce2-33e98548aa44
skygupta07/DSA
36_BinaryTree1/18_flipEquivalentBinaryTree.cpp
// flipEquivalentBinaryTree.cpp #include <bits/stdc++.h> using namespace std; /* For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees. A binary tree X is flip equivalent to a binary tree Y if and only if we can make X equal to Y after some num...
ALGO
0.999952
6.760522
9546f9f9-d67b-4357-90e9-d9897806533d
Roopam-mishra/CPP_Algorithms_and_Problems
Algorithm/Heaps/HEAPSORT(increasing_order).cpp
/* Author: Roopam Mishra */ ********************** #include<bits/stdc++.h> using namespace std; typedef long long int ll; ll a[10000000],n; void swap(ll *x, ll *y) { ll temp = *x; *x = *y; *y = temp; } ll parent(ll i) { return (i-1)/2; } ll leftchild(ll i) { return 2*i+1; } ll rightchild(ll i)...
ALGO
0.999993
4.429538
31e82316-7d25-43b0-9d7d-375650de50cd
quantum-Blue/FlutterProject
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.998756
6.772262
78931b95-9f7c-4d6d-8032-84c9183fc985
notJAYanand/Leetcode
1048-longest-string-chain/1048-longest-string-chain.cpp
class Solution { static bool compare(string &s1, string &s2){ return s1.length() < s2.length(); } public: int longestStrChain(vector<string>& words) { int ans = 1; int n = words.size(); sort(words.begin(), words.end(), compare); unordered_map<string, int> dp;...
ALGO
0.999991
5.888741
c4f81701-6c83-4fcd-8ed8-f2c5514402f5
itlezy/eMule-mods-archive
eMule-0.50a-XCA_1.3-src_VS2010-16.12.11/srchybrid/IP2Country.cpp
//EastShare Start - added by AndCycle, IP to Country /* the IP to country data is provided by http://ip-to-country.webhosting.info/ "IP2Country uses the IP-to-Country Database provided by WebHosting.Info (http://www.webhosting.info), available from http://ip-to-country.webhosting.info." */ // by Superlexx, based...
TOOL
0.853226
4.1828
34722dd9-f398-4d7a-a193-1594b349d3f0
Shoyeb45/CompetitiveProgramming
Codeforces/Contest/Div-4/971/C.cpp
#include<bits/stdc++.h> using namespace std; #define loop(i, n) for(int i = 0; i < n; i++) #define range(x) (x).begin(), (x).end() #define NFS ios_base::sync_with_stdio(false); cin.tie(NULL); typedef long long ll; const ll mod = 1000000007; ll x, y, k; void solve() { cin >> x >> y >> k; int xDir = (x + k - 1)...
ALGO
0.999765
3.99056
277c3777-0676-4509-946e-7d4dff41ea44
pspiyush52/cpp
heap/main.cpp
#include "heap.h" #include <time.h> int main(void) { srand(time(NULL)); Heap h(10); repeat(20) h.insert(rand() % 100); nl std::cout << "Unsorted heap : " << h << std::endl; h.sort(); std::cout << "Heap after sorting : " << h << std::endl; return 0; }
ALGO
0.985478
4.446183
7d79eda1-df8c-4716-bf57-9b0a6475d351
SourabhYelluru131/just-lockdown-problems
Day44-30.05.2020/KClosestPointstoOrigin/KClosestPointstoOrigin.cpp
// https://leetcode.com/problems/possible-bipartition/ class Solution { public: bool dfs(vector<vector<int>>& adj, vector<int>& groups,int v, int grp){ if(groups[v]==-1) groups[v]=grp; else return groups[v]==grp; for(int n:adj[v]){ if(!dfs(adj,groups,n,1-grp)) return false; ...
ALGO
0.999927
6.043134
e825f572-0950-4533-b600-46fd0bbe13a6
illusionarydream/I_render
eigen-3.4.0/bench/sparse_transpose.cpp
//g++ -O3 -g0 -DNDEBUG sparse_transpose.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out // -DNOGMM -DNOMTL // -DCSPARSE -I /home/gael/Coding/LinearAlgebra/CSparse/Include/ /home/gael/Coding/LinearAlgebra/CSparse/Lib/libcsparse.a #ifndef SIZE #define SIZE 10000 #endif #ifndef...
ALGO
0.983535
5.110691
dee55ded-a9fe-41cc-a47b-b349df95eb27
ishandutta2007/codeforces
starlit/normal/949/B.cpp
#include<bits/stdc++.h> using namespace std; int q; long long n,x,tp,now; int main() { scanf("%lld%d",&n,&q); while(q--) { scanf("%lld",&x); tp=n,now=0; while(!(x&1)) { now+=tp>>1; x>>=1; if(tp&1)x++; tp=tp+1>>1; } now...
ALGO
0.999993
3.427034
5aca6bee-dddd-4f9c-9a7c-9bccbad34c9e
Spirit599/algorithm
leetcode/cpp/757.cpp
class Solution { public: int intersectionSizeTwo(vector<vector<int>>& intervals) { sort(intervals.begin(), intervals.end()); int ans = 0; int a = -1; int b = -1; int n = intervals.size(); for(int i = 0; i < n; ++i) { if(intervals[i][0] > b) ...
ALGO
0.999874
5.859133
ebed5340-1799-4457-9e46-6967a30c9111
Emegua/bin-instrumentation.llvm-project-19
libc/src/stdbit/stdc_trailing_ones_ul.cpp
#include "src/stdbit/stdc_trailing_ones_ul.h" #include "src/__support/CPP/bit.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(unsigned, stdc_trailing_ones_ul, (unsigned long value)) { return static_cast<unsigned>(cpp::countr_one(value...
TOOL
0.953124
6.470302
f8248588-53f3-4201-9c41-2f77373988bf
nakatamaho/mplapack
mplapack/reference/Csysv.cpp
#include <mpblas.h> #include <mplapack.h> void Csysv(const char *uplo, INTEGER const n, INTEGER const nrhs, COMPLEX *a, INTEGER const lda, INTEGER *ipiv, COMPLEX *b, INTEGER const ldb, COMPLEX *work, INTEGER const lwork, INTEGER &info) { // // Test the input parameters. // info = 0; bool lquery...
ALGO
0.999611
3.97821
ce779ee3-f1ac-44b2-a415-a74a68e743d0
ofabriciofarias/pythonScripts
Aula 16/opencv-4.x/apps/createsamples/utility.cpp
#include <cstring> #include <ctime> #include <sys/stat.h> #include <sys/types.h> #ifdef _WIN32 #include <direct.h> #endif /* _WIN32 */ #include "utility.hpp" #include "opencv2/core.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/highgui.hpp" #include "opencv2/calib3d.hpp" #if d...
ALGO
0.994314
3.585428
748f49e6-5051-4199-bd45-6ebde00ce5e4
cafeTechne/C-PracticeProblems
backwardsStringPointer.cpp
// HW Chatper 10 CSC215 LaGuardia-LoBianco.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> void backwardString(char* charPtr); using namespace std; int main() { const int SIZE = 180; char line[SIZE] = {}; cout << "User, please type in a bloc...
TOOL
0.928145
3.402312
38eeffab-4eea-42c7-b407-d8bfc2bde041
arjun451/CP
A_Bus_to_Udayland.cpp
// Header Files #include <bits/stdc++.h> #include<iostream> #include<algorithm> #include<vector> #include<utility> #include<set> #include<unordered_set> #include<list> #include<iterator> #include<deque> #include<queue> #include<stack> #include<set> #include<bitset> #include<map> #include<unordered_map> #include<std...
ALGO
0.999879
3.931298
78f7ab55-528b-4525-8b5b-1477367fc9ef
Ryb7532/AtCoder
submissions/abc164/c.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<string> S; string s; for (int i=0; i<N; i++) { cin >> s; S.push_back(s); } sort(S.begin(), S. end()); s = S[0]; int ans = 1; for (int i=1; i<N; i++) if (s != S[i]) { s = S[i]; ans++; } c...
ALGO
0.999842
3.813305
41dfbe93-9ffe-4048-891a-99b4c807cf59
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/MixtralExpert/top0-100/perfect-rectangle-Solution.isRectangleCover/177832_nan.cpp
walk_string(fz_context *ctx, int uni, int remove, editable_str *str) { int rune; if (str->utf8 == NULL) return; do { char *s = &str->utf8[str->pos]; size_t len; int n = fz_chartorune(&rune, s); if (rune == uni) { /* Match. Skip over that one. */ str->pos += n...
TOOL
0.993637
6.546173
3227c3f8-487b-475c-985d-d2b5c42dd3a2
Quinny/Problem-of-the-Week
year2/week6/test_maker.cpp
#include <iostream> #include <fstream> #include "solution/directed_graph.h" #include <random> #include <vector> #include <set> #include <queue> template <typename T> struct rand_vec { std::vector<T> v; void push_back(T x) { v.push_back(x); } T get() { return v[rand() % v.size()]; ...
ALGO
0.981268
4.874149
c337b998-c2c6-41dd-aa0c-aa66408f8036
ishandutta2007/codeforces
tourist/normal/1609/G.cpp
/** * author: tourist * created: 28.11.2021 18:24:02 **/ #include <bits/stdc++.h> using namespace std; template <typename A, typename B> string to_string(pair<A, B> p); template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p); template <typename A, typename B, typename C, typ...
ALGO
0.999883
4.104334
7e8f4016-c58f-4c6a-9cce-e4f70e0e2a60
adityanjr/code-DS-ALGO
CodeForces/Complete/1100-1199/1106A-LunarNewYearAndCrossCounting.cpp
#include <iostream> #include <vector> int main(){ long n; std::cin >> n; std::vector<std::string> a(n); for(long p = 0; p < n; p++){std::cin >> a[p];} long cnt(0); for(long row = 1; row < n - 1; row++){ for(long col = 1; col < n - 1; col++){ if(a[row][col] == 'X' && a[row - 1][col ...
ALGO
0.999897
4.806061
2fbdd46c-0078-4ffc-8e8e-20fb0d981701
MinahilImran836/Week-6-PF
p7.cpp
#include<iostream> using namespace std; float discount(string day, string month, float price); main(){ float price, payable; string day , month; cout << "Enter Purchase Day: "; cin >> day; cout << "Enter Purchase Month: "; cin >> month; cout << "Enter Purchase Amount: "; cin >> price; ...
TOOL
0.884658
3.951062
c450bb82-78be-4899-9a92-c1f819326ffa
ashishkushwaha56/LeetCode-Leethub
1492-time-needed-to-inform-all-employees/1492-time-needed-to-inform-all-employees.cpp
class Solution { public: int ans = 0; // void bfs(vector<vector<int>>&v,vector<int>&vis,vector<int>&informTime,int headID){ // // vector<int>tt; // queue<int>q; // int temp; // q.push(headID); // // int t = 1; // // int c =0; // vis[headID] = 1; // ...
ALGO
0.999924
5.777407
d21867b5-a405-4d79-a400-7e74b71cdd06
achrafoo2018/Competitive_Programming_Contests
codeforces/854div2/a.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<bool> vb; typedef vector<char> vchr; typedef vector<string> vstr; typedef vector<vi> vvi; typedef vector<vchr> vvchr; typedef vector<ll> vll; typedef vector<pi...
ALGO
0.999974
4.346609
de375d5a-85f5-48db-b8bf-5fc91a0b13c5
bgodala/gem5_ARM_FDIP
src/systemc/tests/systemc/misc/unit/data/datawidth_signed/lost_carry/datawidth.cpp
/***************************************************************************** datawidth.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.980459
5.322278
9c56517b-4f7b-4fc5-b135-f0887e2d3970
kajal-jotwani/Learning-c-
if_else/learn_html/pattern pritning/learn c++/square_pattern.cpp
#include <iostream> using namespace std; int main() { int n; cout<<"enter"; cin >> n; int i=1; while (i <= n) { int j = 1; while (j <= n) { cout <<i<< " "; j = j + 1; } cout << endl; i = i + 1; } return 0; }
ALGO
0.999557
3.679396
b584bd78-dde7-4d00-8511-3dbb0afb9dd2
SobhiSandakli/Option-Pricing
server/calculations/MonteCarlo.cpp
#include <iostream> #include <cmath> #include <random> #include <string> // Monte Carlo simulation for a European call option double monte_carlo_call(double S, double K, double T, double r, double sigma, int numSimulations, unsigned int seed) { std::mt19937 gen(seed); std::normal_distribution<> normalDist(0.0,...
ALGO
0.99967
7.195765
08c825d1-a10f-4bc5-9790-56a8963677db
jmsman3/week---4-Stack-and-Queue---DSA-
week - 4 ( Stack and Queue)/Module-16(Assignment-02)/Special_Queries.cpp
#include <bits/stdc++.h> using namespace std; int main() { int q; cin >> q; queue<string> TicketSerial; while (q--) { int command; cin >> command; if (command == 0) { string name; cin >> name; TicketSerial.push(name); } ...
ALGO
0.999199
5.261863
b1511460-4c8b-4c2d-842e-a8699cfe2a87
emotionless/Programming-Problem-Solution
codeforces/238_E.cpp
#include <cstring> #include <cassert> #include <vector> #include <list> #include <queue> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <...
ALGO
0.99998
3.538187
5350c74d-5f1a-48c9-b688-99c38cdaa3c2
caugner/firefox-releases
mozglue/misc/SIMD_avx2.cpp
/* vim: set ts=8 sts=2 et sw=2 tw=80: */ #include "mozilla/SIMD.h" #include "mozilla/SSE.h" #include "mozilla/Assertions.h" // Restricting to x86_64 simplifies things, and we're not particularly // worried about slightly degraded performance on 32 bit processors which // support AVX2, as this should be quite a minor...
TOOL
0.962754
6.891205
4bd3f950-cfce-469e-8408-5f7de72d3543
yous/automated-software-testing
hw4/llvm/lib/Support/Program.cpp
#include "llvm/Support/Program.h" #include "llvm/Config/config.h" #include "llvm/Support/system_error.h" using namespace llvm; using namespace sys; //===----------------------------------------------------------------------===// //=== WARNING: Implementation here must contain only TRULY operating system //=== ...
TOOL
0.864277
6.80589
36edc147-4d8f-4cc1-9cbe-b94f3c849ebd
YiNingLi-tech/Cpp_basal_grammar
ex158-3.cpp
#include<iostream> using namespace std; int main() { int n; cin>>n; int x; int max; int min; for(int i=0;i<n;i++) { cin>>x; if(i==0) { max=x; min=x; } else { if(x>max) { max=x; } if(x<min) { min=x; } } } cout<<max<<" "<<min; return 0; }
ALGO
0.999893
3.892661
51738d1f-10f9-440b-b5c8-2205afcec08a
kuujhin/24DS-SWEA
0329/league.cpp
#include <stdio.h> #define MAX_N 39990 #define CMD_INIT 100 #define CMD_MOVE 200 #define CMD_TRADE 300 void init(int N, int L, int mAbility[]); int move(); int trade(); static bool run() { int query_num; scanf("%d", &query_num); int ans; bool ok = false; for (int q = 0; q < query_num; q++) { ...
ALGO
0.998585
3.549471
92134be8-a57d-4f28-8cc6-7332172dcb44
wilfeli/DMGameBasic
ExternalTools/Eigen/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.999848
4.186114
37160f3b-f6fb-455c-9c37-38b67e212b73
Piotrekf3/PR---OpenMP
ProjektPR/Main.cpp
// Celem tego programu jest prezentacja pomiaru i analizy //efektywnosci programu za pomocš CodeAnalyst(tm). // Implementacja mnożenia macierzy jest realizowana za pomoca typowego // algorytmu podręcznikowego. #include <stdio.h> #include <time.h> #include <windows.h> #include "omp.h" #include <iostream> #include ...
ALGO
0.999588
3.653239
d97a28db-b7f9-4ade-8e3b-95147e46ef84
ishandutta2007/codeforces
dmga44/normal/1195/D2.cpp
#include <bits/stdc++.h> #define db(x) cout << (x) << '\n'; using namespace std; typedef long long ll; typedef pair<ll,ll> pii; typedef pair<pii,pii> ppp; #define MAXN 100005 #define mod (ll(998244353)) ll a[MAXN]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); ll n; cin >> n; for(int i=0...
ALGO
0.999928
4.244606