uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
2e7ed35b-8420-489f-a45e-0da3a8ff6469
Precipitating/LeetCode
Pascal's Triangle II/enc_temp_folder/46c92132d5d1db3b794ac975fbcf2696/Source.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: vector<int> getRow(int rowIndex) { vector<int> row = { 1 }; for (size_t i = 1; i <= rowIndex; ++i) { row.push_back(1); for (size_t j = i - 1; j > 0; --j) { ...
ALGO
0.999662
5.667048
18c0b7d3-a666-4136-aab6-f81289884026
20722415/homeworks
多邊形判斷/driver program_main.cpp
// 111hw5 The Quadrilateral test Version #include <iostream> using namespace std; #include "s1111413_myQuad.h" int main(int argc, const char * argv[]) { int x1, y1, x2, y2, x3, y3, x4, y4, choice; myQuadrilateral* current = 0; while (true) { cout << "(1) Quadrilateral (default)" << endl; ...
TOOL
0.978673
3.991885
d04efdd5-6c4b-41b9-8c7f-1da54e7971d6
amansaxena1/Competitive-Coding
Codechef/K_th_Maximum.cpp
/* ¯ಠ_ಠ_/¯ */ #include <bits/stdc++.h> #define llint long long int #define mod 1000000007 using namespace std; #define pb push_back #define mp make_pair #define ff first #define ss second #define all(c) c.begin(), c.end() #define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr) vo...
ALGO
0.999873
4.296317
6e21fd8f-e4af-4b3e-942f-658876686a45
sarvex/leetcode-jai
lcof/面试题03. 数组中重复的数字/Solution.cpp
class Solution { public: int findRepeatNumber(vector<int>& nums) { for (int i = 0;; ++i) { while (nums[i] != i) { int j = nums[i]; if (nums[j] == j) { return j; } swap(nums[i], nums[j]); } } ...
ALGO
0.999874
5.702555
19e728b5-1193-4de3-bfe2-050a46ab13cd
mehtatanuj/cp
training sheet/division A/A. Night at the Museum.cpp
#include <bits/stdc++.h> # define lli long long int using namespace std; int main() { string s; cin>>s; int sum=0; if(abs(s[0]-'a')>13) { sum+=26-abs(s[0]-'a'); } else { sum+=abs(s[0]-'a'); } for(int i=0;i<s.length()-1;i++) { if(abs(s[i]-s[i+1])>13) { sum+=26-abs(s[i]-s[i+1]); } else ...
ALGO
0.999966
3.719558
2fb5d91f-7e8b-491a-8e8e-d2e6fabc80b8
siobhan-saoirse/siobhans-tf-src
src/tier1/qsort_s.cpp
/******************************************************************/ /* qsort.c -- Non-Recursive ANSI Quicksort function */ /* */ /* Public domain by Raymond Gardner, Englewood CO February 1991 */ /* ...
ALGO
0.999994
6.614483
c7dd626b-bda2-4209-8acd-314fbc7b8e9c
Patidarrambabu/Vault
negi/Algo/prims.cpp
#include<bits/stdc++.h> using namespace std; //TIME COMPLEXITY : O(E log V + V log E) class Graph{ int n; vector<vector<pair<int,int>>> adj; public: Graph(int N) : n(N) { adj.resize(n); } void addEdge(int u,int v,int w){ adj[u].push_back({v,w}); adj[v].push_back({u,w}); } ...
ALGO
0.999795
4.406873
0883f4bb-963d-41b2-bb9d-6f603572db47
fonlylovey/CesiumMVT
Plugins/CesiumForUnreal/extern/cesium-native/Cesium3DTilesSelection/src/MVTUtilities.cpp
#include <Cesium3DTilesSelection/MVTUtilities.h> #include <mapbox/earcut.hpp> #include <vector> namespace Cesium3DTilesSelection { CesiumGeometry::QuadtreeTileID MVTUtilities::GetTileID(const TileID& tileId) { struct Operation { CesiumGeometry::QuadtreeTileID operator()(const...
TOOL
0.882539
6.86319
e0761350-2928-4e00-8abd-d0851f9c445c
archeos/micmac-archeos
src/morpho_cabl/skel_interface.cpp
#include "StdAfx.h" Liste_Pts_U_INT2 Skeleton ( U_INT1 ** result, U_INT1 ** image, int tx, int ty, int surf_threshlod, double angular_threshlod, bool skel_of_disk, bool prolgt_extre,...
TOOL
0.852984
4.577011
ef687700-7af9-4e14-b34c-b4a4632e9dc9
xenon1919/Accenture-Coding
ACCENTURE CODING/findLatestVersion.cpp
#include <iostream> #include <vector> #include <string> using namespace std; // Function to find the latest version int findLatestVersion(const vector<string>& files) { int latestVersion = -1; for (const string& file : files) { if (file.substr(0, 5) == "file_") { int version = stoi(file.su...
ALGO
0.932822
6.64827
87ef6d7a-686e-4871-8257-10dc4f011494
andresax/photometricRefinement
src/subdivider/MeshSubdivider.cpp
#include <MeshSubdivider.h> #include <CGAL/Iterator_range.h> #include <CGAL/boost/graph/graph_traits_Surface_mesh.h> #include <CGAL/Polygon_mesh_processing/remesh.h> #include <CGAL/Polygon_mesh_processing/border.h> #include <boost/function_output_iterator.hpp> #include <utilities.hpp> namespace PMP = CGAL::Polygon_me...
ALGO
0.961805
5.622669
871afc46-40c9-4067-ba2c-395fd16c3803
madlfox7/webserv_parsing
pars_a/getFileContent.cpp
#include "Parser.hpp" static std::map<int, std::pair<std::vector<std::string>, std::vector<std::string> > > serverBlockData; string get_filename(int argc, char **argv) { if (argc > 2) throw std::runtime_error("⚠ Error: Too many arguments"); if (argc < 2) { string defaultPath = resolvePath...
WEB
0.962369
5.435147
0467c217-8482-4e49-abbc-82146d77a35e
Kenneth-Nicholas/COSC-1550-02-C-Programming-I
Q25_27.cpp
#include <iostream> using namespace std; void get3numbers(int &a, int &b, int &c); int findMax(int x, int y, int z); int main() { int n1, n2, n3; get3numbers(n1, n2, n3); cout << "The max of the 3 numbers is " << findMax(n1, n2, n3) << endl; return 0; } void get3numbers(int &a, int &b, int &c) { cout << "...
ALGO
0.988131
4.039906
e25e7337-58a6-426a-9812-be1f2dd8c756
sulaimonlasisi/parallelcomp
project_scc_omp/graph_main.cpp
#include "graph_scc_fwbw.h" //#include "graph_scc_parallel.h" //#include "graph_scc_serial.h" //#include "graph_for_loop.h" #include <omp.h> #include <iostream> #include <time.h> using namespace std; // Driver program to test above functions int main() { // create the graph given in above fugure //int V = 5; ...
ALGO
0.998749
3.582295
cdc58ed1-ba0a-4dd5-b87f-6922798c1e92
raincross7/code-similarity
codes/train_code/problem332/problem332_431.cpp
#include <bits/stdc++.h> #define pb push_back #define ppb pop_back #define fi first #define se second #define mid ((x + y) / 2) #define left (ind * 2) #define right (ind * 2 + 1) #define mp make_pair #define timer ((double)clock() / CLOCKS_PER_SEC) #define endl "\n" #define spc " " #define d1(x) cerr<<#x<<":"<<x<<endl ...
ALGO
0.999955
3.987622
f0a5dc08-5633-4b87-b339-a6e436dba0ce
MSCE19/algorithmStudy
SiHyeon/week2/멀리 뛰기.cpp
#include <string> #include <array> using namespace std; array<long long, 9999> memory = { 0, }; long long fibonacci(long long n) { long long result; if (n <= 1) return n; long long index = n; if (memory[index]) return memory[index]; else result = (memory[index] = fibonacci(n - 1) +...
ALGO
0.999971
4.972402
19d1ef71-0b41-4b74-8daf-162eaf51b158
yunshengtian/ASAP
simulation/externals/libigl/include/igl/decimate.cpp
IGL_INLINE bool igl::decimate( const Eigen::MatrixXd & V, const Eigen::MatrixXi & F, const size_t max_m, Eigen::MatrixXd & U, Eigen::MatrixXi & G, Eigen::VectorXi & J, Eigen::VectorXi & I) { // Original number of faces const int orig_m = F.rows(); // Tracking number of faces int m = F.rows(); ty...
ALGO
0.999231
6.223881
4ea719b7-aad1-4067-8e14-f13df884e99a
osumi-kyopuro/icpc
hayatoki22.cpp
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<queue> #include<climits> #include<set> #include<map> #define ll long long using namespace std; ll keta(ll number) { ll d = 0; while (number != 0) { number = number / 10; d++; } return d; } int main() { ll a, b, big = 0, mae = 0,...
ALGO
0.998692
3.294669
29959a13-c09b-4e5c-bb32-51dcf3bae623
dmicha02/Code-projet-M2-TMR-2014-2015
optimisation/matcher.cpp
#include "optimization.h" #include "matcher.h" #include <iostream> #include <sstream> #include <string> #include <cstdio> #include <timer.h> #include <stdexcept> #include "io.h" using namespace std; using namespace cv; matcher::matcher(Rect initialPosition, InputArray img_fusion, Matching_Mode mode) { last_img_f...
ALGO
0.98598
3.769446
50ca6f77-3dcc-403e-a36c-6d8ab1582f54
yugavardhank/PRODIGY_AD_02
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
40d7e248-be62-4f19-ae8a-8264834686f8
BangHonor/PAT-code
dynamic.cpp
/* //递归 const int maxv=10010; int dp[maxv]; int f(int n){ if(n==0||n==0) return 1; if(dp[n]==-1){ dp[n]=f(n-1)+f(n-2); //实时记录 return dp[n]; } else return dp[n]; } //递推 int dp[maxv][maxv],f[maxv][maxv]; //f记录每一个数,dp记录路径上最大的数 int main(){ for(int i=1;i<=n;i++){ ...
ALGO
1
3.77366
fb936a80-2139-48fb-b751-25e6555e9ec1
emanlaicepsa/codes
cf1270A.cpp
#include <bits/stdc++.h> #define IOS ios::sync_with_stdio(false);cin.tie(0); #define fi first #define se second #define reset(n,k) memset((n),k,sizeof(n)) #define all(n) n.begin(),n.end() #define pb push_back using namespace std; using ll=long long; using pii=pair<int,int>; int arr1[105]; int arr2[105]; int main(){ in...
ALGO
0.999734
3.367024
ddaf75c4-6bc1-4941-9f4c-788e3f78bd5f
purinsol1208/OOP_week04
OOP_week04_02/OOP_week04_02/homework02.cpp
#include <iostream> void swap(int &first, int &second) { int temp = first; first = second; second = temp; } int main() { int a = 2, b = 3; swap(a, b); std::cout << a << " " << b << std::endl; return 0; }
ALGO
0.996653
4.695473
186eeb9f-bca7-4fc2-ac80-4754ad5f326e
mjcarl/Algorithms
递归_回溯_动态规划/试卷成绩加起来刚好100分.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; //νп 1. 2. Ϊѭ 3. ݹжڽforѭݹŸȼ1 #define SCORE 100 int N; vector<int> a; bool x[100]; //ʾǰǷsum int sum = 0; int num = 0; void backtrace(int deep) //deepʾ { if(sum > SCORE) return; if (sum == SCORE) { cout << "" << num << endl; for (...
ALGO
0.99992
3.478323
d7a3030b-531b-4446-ba0c-3df2162a8547
f-zyj/ACM
按 OJ 分类/51Nod/f-51Nod-1390-游戏得分/f-51Nod-1390-游戏得分/main.cpp
//#include <iostream> //#include <cmath> // //using namespace std; // //const int INF = 0x3f3f3f3f; // //int ans; //long long x, y; // //void dfs(long long round, long long tmp, int count) //{ // if (tmp == 0 && count < ans) // { // ans = count; // return ; // } // for (long long i = round; i ...
ALGO
0.999989
4.652412
e576a5b4-9f4c-4612-be07-aa307df0b2e8
Hima0X2/codechef-AtcoderSOLution
B - Digit Sums.cpp
#include<bits/stdc++.h> using namespace std; int main() { long long int a,b,c,d,sum=0; cin>>a; b=a; while(a) { sum=sum+a%10; a=a/10; } //cout<<sum<<endl; if(b%sum==0) { cout<<"Yes\n"; } else { cout<<"No\n"; } }
ALGO
0.999979
3.335658
34a3c943-1351-4041-8a42-18896d21a4d0
Andwerpz/Competitive-Programming-Practice
- cpp -/templates/trie.cpp
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; //for strings struct Trie { struct TrieNode { TrieNode* c[26]; bool isWord = false; //true if a word ends on this node int numWords = 0; //counts how many words use this node as prefix }; ...
ALGO
0.999894
4.02948
708a6031-0ed8-4b86-afda-1f65a995fd78
chenweihan02/autoware_note
op_planner/src/MappingHelpers.cpp
/// \file MappingHelpers.cpp /// \brief Helper functions for mapping operation such as (load and initialize vector maps , convert map from one format to another, .. ) /// \author Hatem Darweesh /// \date Jul 2, 2016 #include "op_planner/MappingHelpers.h" #include "op_planner/MatrixOperations.h" #include "op_planner/P...
TOOL
0.885447
3.564352
13572006-50bf-44ae-b390-508d934c3275
Source-Authors/Obsoletium
utils/height2normal/height2normal.cpp
#include "mathlib/mathlib.h" #include "bitmap/imageformat.h" #include "bitmap/TGAWriter.h" #include "bitmap/TGALoader.h" #include "tier1/strtools.h" #include "tier1/utlbuffer.h" #include "tier2/tier2.h" #include "filesystem.h" #include "tools_minidump.h" #include <direct.h> #include <conio.h> #include "tier0/memdbgon...
TOOL
0.897059
4.936023
33dc12d0-4c6e-4030-aceb-27f3e7e1e0b9
kovid-sharma/LeetCode
Fraction Trouble - GFG/fraction-trouble.cpp
// { Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: vector<int> numAndDen(int n, int d) { // code here int up=-1; int down=1; for(int i=d+1;i<=10000;i++)...
ALGO
0.999797
6.49882
720720ef-b56e-45b3-8ff5-c4bb631ca9aa
ishandutta2007/codeforces
andrew/normal/1257/A.cpp
#include <bits/stdc++.h> #pragma GCC optimize("-O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #define fi first #define se second #define p_b push_back #define pll pair<ll,ll> #define pii pair<int,int> #define m_p make_pair #define all(x) x.begin(),x.end() #define sset ordered_set #define sqr...
ALGO
0.999751
4.4352
23a1e25d-1402-43f6-a067-95e9746f3260
danilovict2/Competitive-Programming-Problems
CSES/Subarray Sums II/main.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define pb push_back #define pii pair<int, int> #define vi vector<int> #define vii vector<pair<int, int>> #define mp make_pair #define sz(a) a.size() #define MOD 1000000007 #define forn(i, n) for (int i = 0; i < n; ++i) #...
ALGO
0.999701
3.958626
7656e9f0-b0f0-4e70-bfd9-d80e0e89195e
Kuwado/Cpp
TH/Weak1/Untitled2.cpp
#include <bits/stdc++.h> using namespace std; // Hm xy d?ng cy nh? phn void build_tree(const vector<int>& arr, vector<int>& tree, int node, int start, int end) { if (start == end) { tree[node] = arr[start]; return; } int mid = (start + end) / 2; int left_node = 2 * node + 1; int r...
ALGO
0.999993
5.77579
7d09bc84-bb92-479a-90a4-b957b50a3f21
mu-fazil-vk/Netflix
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
4718eac1-7feb-4021-83e7-c2eb07889fa4
Bearwaves/growl
src/tools/growl-cmd/src/assets.cpp
#include "../thirdparty/rang.hpp" #include "assets_config.h" #include "error.h" #include "fpng.h" #include "growl/core/assets/bundle.h" #include "growl/core/assets/error.h" #include "growl/core/assets/file.h" #include "growl/core/assets/font_face.h" #include "growl/core/assets/local_file.h" #include "growl/core/assets/...
TOOL
0.89993
7.455971
1ee58e86-2cab-40c9-88b2-aacd8bec512b
ishandutta2007/codeforces
peterr/normal/1559/B.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) { int n; string s; cin >> n >> s; if (all_of(s.begin(), s.end(), [](char ch) {return ch == '?';})) { for (int i = 0; i < n; i++) { if (i & 1) cout << ...
ALGO
0.999956
4.111611
cc9748a4-0313-4437-9fa3-a62c5da97269
akshadagrawal/DSA-450
Array/7.cpp
//Cyclically rotate array one by one #include<bits/stdc++.h> using namespace std; void rotate(int arr[], int n){ for(int i=0;i<n-1;i++){ swap(arr[i], arr[n-1]); } } int main(){ int n; cin>>n; int arr[n]; for(int i=0;i<n;i++) cin>>arr[i]; rotate(arr, n); for(int i=0;i<n;i++) cout...
ALGO
0.99997
4.051865
09d9d97c-5762-4507-8d6a-4c850e97eae6
ishandutta2007/codeforces
neko_nyaaaaaaaaaaaaaaaaa/normal/900/A.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long n, x, y, mi = 0, pl = 0; cin >> n; while (cin >> x >> y) { if (x > 0) { pl++; } else {mi++;} if (pl > 1 && mi > 1) {cout << "no"; return 0;} } cout << "yes"; }
ALGO
0.999939
3.954092
fa8d2049-6f95-4ae8-a7fb-d025e3b26479
gilbertoalexsantos/judgesolutions
Solved/UVA/@UVA 1262 - Password/1262 - Password.cpp
//Author: Gilberto A. dos Santos //Website: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3703 #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <string> using namespace std; char grid1[6][6], grid2[6][6]; char ans[6]; void T_sort() ...
ALGO
0.999542
3.4671
89f070c1-a470-4045-9e84-89eb72fa5486
nteno555/xcamp
201D/Wk2/blackred.cpp
#include <iostream> using namespace std; int w, h, sx, sy, count; int maze[20][20]; int visited[20][20]; void floodfill(int x, int y) { if (maze[x][y] == 1 || x >= h || y >= w || x < 0 || y < 0 || visited[x][y] == 1) { return; } visited[x][y] = 1; count++; floodfill(x-1, y); floodfill(...
ALGO
0.999041
3.801479
5a631a2c-c194-493b-aef9-4bf79cd459d1
borisbulychev/bulychev_b_y
bpm_22_1_2.cpp
#include <iostream> #include <cmath> int main() { int k = 0; double x, y = 0; for (int i = 1; std::cin >> x >> y; i++) { if ((y >= -(std::pow(x, 2)) + 2) && (std::pow(y, 2) + std::pow(x, 2) <= 4)) { k += 1; } std::cout << std::round(100 * k / i); } }
ALGO
0.999004
4.517992
cdf9adae-f17a-4359-8691-9f58f7a66d09
vusonbmt/cpp_makefile_template
cpp_for_programmer/c3_arithmetic_operation/cpp_3_14/main.cpp
/*Fix the errors and get an error free compilation and execution.*/ #include <iostream> #include <string> #include <sstream> #include <cmath> int main() { int coeff1, coeff2, constant; int exp1, exp2; int y; int x; //Calculate the value of y for a user defined three term polynomial //Get the c...
ALGO
0.99342
3.635508
69c807cf-0d0f-4da0-aeaf-c280518203ff
roeas/GAMES101-Premake
Frame/Source/ThirdParty/opencv/3rdparty/carotene/src/warp_perspective.cpp
#include "remap.hpp" namespace CAROTENE_NS { bool isWarpPerspectiveNearestNeighborSupported(const Size2D &ssize) { #if SIZE_MAX > UINT32_MAX return !(ssize.width > 0xffffFFFF || ssize.height > 0xffffFFFF) && // Restrict image size since internal index evaluation ...
ALGO
0.996212
6.947635
d9f66b24-429f-4349-b9dd-e2c921e59f12
walz6800/ROS
mec/src/navigation-melodic/global_planner/src/astar.cpp
#include<global_planner/astar.h> #include<costmap_2d/cost_values.h> namespace global_planner { AStarExpansion::AStarExpansion(PotentialCalculator* p_calc, int xs, int ys) : Expander(p_calc, xs, ys) { } bool AStarExpansion::calculatePotentials(unsigned char* costs, double start_x, double start_y, double end_x...
ALGO
0.999417
6.404588
b5bde352-9599-4108-82d3-8ab419b9059d
nguyenpham/banksiagui-ios
engines/rubichess/rubichess_texel.cpp
// // This file contains code related to Texel tuning and pgn/fen manipulating tools // #include "rubichess_RubiChess.h" using namespace rubichess; #ifdef EVALTUNE alignas(64) evalparamset epsdefault; chessposition pos; U64 fenWritten; string pgnfilename; string fentuningfiles; bool quietonly; bool balancedonly; ...
TOOL
0.916126
5.745739
0c1891b1-80b6-4a89-9fae-d45ad45a5888
ish-123-m/test1
C++/web-crawler.cpp
// Time: O(|V| + |E|) // Space: O(|V|) /** * // This is the HtmlParser's API interface. * // You should not implement it, or speculate about its implementation * class HtmlParser { * public: * vector<string> getUrls(string url); * }; */ class Solution { public: vector<string> crawl(string startUrl, H...
ALGO
0.998596
6.107982
d2c273f2-c14f-447d-a2b4-c45876bb567b
harshshah96/Leetcode
234-palindrome-linked-list/palindrome-linked-list.cpp
static int io_opt = []() { ios::sync_with_stdio(false); return 0; }(); class Solution { public: ListNode* reverseList(ListNode* head) { // iterative solution ListNode* prev=NULL; ListNode* curr=head; ListNode* next=NULL; while(curr){ next=curr->next; cur...
ALGO
0.9999
5.99652
bc981598-60fd-455e-b452-12309bb42411
belight2/BOJAlgorithm
BOJ7576.cpp
#include <iostream> #include <queue> #include <utility> #define X first #define Y second using namespace std; queue<pair<int, int>> Q; int tomato[1005][1005]; int days[1005][1005]; int dx[4] = {1,0,-1,0}; int dy[4] = {0,1,0,-1}; int n, m, x, cnt; pair<int, int> BFS(){ while(1){ pair<int, int> cur = Q.front(); Q.po...
ALGO
0.999902
4.511963
56556b1c-341a-44ff-8717-5beeca773374
kaurmanjot20/oops
A3/q3.cpp
/* Write a program to add data objects of two different classes using friend functions.*/ #include <iostream> using namespace std; class ClassB; // Forward declaration of ClassB class ClassA { private: int valueA; public: // Constructor to initialize valueA ClassA(int val) { valueA = val; } ...
ALGO
0.956952
6.453734
b7152c3c-7f3b-4313-83dd-7a45a2769b74
Geode-solutions/OpenGeode-Inspector
src/geode/inspector/criterion/internal/colocation_impl.cpp
#include <geode/inspector/criterion/internal/colocation_impl.hpp> #include <geode/basic/logger.hpp> #include <geode/mesh/core/edged_curve.hpp> #include <geode/mesh/core/point_set.hpp> #include <geode/mesh/core/solid_mesh.hpp> #include <geode/mesh/core/surface_mesh.hpp> #include <geode/geometry/point.hpp> namespace ...
TOOL
0.942712
7.685222
db748906-210a-43f1-9bef-e4a2c033c2bc
ishandutta2007/codeforces
300iq/normal/924/C.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); int n; cin >> n; vector<int> m(n); for (auto& x : m) cin >> x; vector<int> le(n + 1); for (int i = 0; i < n; ++i) le[i + 1] = max(le[i], m[i] + 1); vector<int> le1 = le; vector<...
ALGO
0.999956
4.26467
deb973e5-4f5f-4301-878f-5f05f893d6a2
feal-ca/Class-Code
ExercisesCpp/difference.cpp
#include <iostream> #include <vector> using namespace std; vector<double> difference(const vector<double> &v1, const vector<double> &v2) { vector<double> result; int i = 0; int j = 0; while (i < v1.size() and j < v2.size()) { if (v1[i] == v2[j]) { ++i; } else if (v1[i] > v2[j]) { ++j; ...
ALGO
0.999797
4.227049
a31523a9-b3a2-43d7-8695-c8c911857d51
Giang-22/PPS
Practise/FindNo/PPDayCung.cpp
#include<bits/stdc++.h> using namespace std; double TinhP(double *a,int n,double k){ double S = 0; for(int i=0;i<=n;i++){ S += a[i] * pow(k,n-i); } return S; } double TinhPp(double *a,int n,double k){ double S = 0; for(int i=0;i<=n-1;i++){ S += a[i]*(n-i) * pow(k,n-i-1); } ...
ALGO
0.999536
3.270718
b0501a83-caf8-4303-b825-2555ab4da5a6
Surajsinhar77/DASandAll
CPP/Coding Ninja/Function/CheakFibSeri.cpp
#include<iostream> #include<math.h> using namespace std; bool checkmember(int n){ int res = 5*(n*n)+4; int res2 = 5*(n*n)-4; double pfsq = sqrt(res); double pfsq2 = sqrt(res2); int cvpfsq = sqrt(res); int cvpfsq2 = sqrt(res2); if(pfsq == cvpfsq || pfsq2 == cvpfsq2){ return tru...
ALGO
0.999917
3.288317
3a37ff6b-9720-417c-8168-cf8aa8441297
pradeepa45/LeetCode-Assignments
ReverseLinkedList.cpp
/** * 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, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* reverseList...
ALGO
0.999567
5.639731
ce78992d-1dd6-4a55-8cdd-dd853cbf83c1
Hwannam/Object-Oriented-Programming
Lab2/q2.cpp
#include <iostream> using namespace std; double sum(int x, int y) { return x + y; } double sub(int x, int y) { return x - y; } double mult(int x, int y) { return x * y; } double idiv(int x, int y) { return (double)x / y; } double add_mult(int x, int y, int z) { return mult(sum(x, y),z); } double mult_div(int x, ...
ALGO
0.996395
4.244459
8e3bb40c-4987-41cc-8673-49b3cfc628fd
0rirobin0/Numerical-Analysis-Lab-SWE
Task_201.cpp
// Gaussian Elimination Method for Polynomial Coefficients // Author: Robin // Reg ID: 2020831043 #include<bits/stdc++.h> using namespace std; // Function to solve a system of linear equations using Gauss Elimination method vector<double> gaussElimination(vector<vector<double>> systemMatrix, vector<double> constants)...
ALGO
0.999915
4.584723
10ace95c-81f6-4f80-bf4b-5c16f841f067
lczech/genesis
lib/genesis/taxonomy/functions/kmer_partitioning.cpp
/** * @brief * * @file * @ingroup taxonomy */ #include "genesis/taxonomy/functions/kmer_partitioning.hpp" #include "genesis/taxonomy/functions/kmer.hpp" #include "genesis/taxonomy/functions/operators.hpp" #include "genesis/taxonomy/functions/taxonomy.hpp" #include "genesis/taxonomy/iterator/preorder.hpp" #includ...
ALGO
0.949684
6.771918
84a53ca2-ae65-4387-881e-aa54e6d7b03e
Aryaman3007/CP-DSA
detectCycleUndirectedGraph.cpp
#include <bits/stdc++.h> using namespace std; bool detect(int src, vector<int> adj[], int vis[]) { vis[src] = 1; queue<pair<int, int>> q; q.push({src, -1}); while (!q.empty()) { int node = q.front().first; int parent = q.front().second; q.pop(); for (auto adjacent : ...
ALGO
0.999675
5.553606
633fb506-d255-42c0-a977-79671346fdf0
greensci/greensoupmod-src
mp/src/game/server/episodic/grenade_hopwire.cpp
#include "cbase.h" #include "grenade_hopwire.h" #include "rope.h" #include "rope_shared.h" #include "beam_shared.h" #include "physics.h" #include "physics_saverestore.h" #include "explode.h" #include "physics_prop_ragdoll.h" #include "movevars_shared.h" // memdbgon must be the last include file in a .cpp file!!! #incl...
TOOL
0.875321
5.620619
eb14daac-5b22-40ff-bee3-28fec786d859
MissAK47/OSCEAN
core_services_impl/metadata_service/src/core/query_engine.cpp
// 🚀 使用Common模块的统一boost配置 #include "common_utils/utilities/boost_config.h" OSCEAN_NO_BOOST_ASIO_MODULE(); // metadata服务不使用boost::asio,只使用boost::future #include "impl/query_engine.h" #include "impl/unified_database_manager.h" // #include "common_utils/utilities/logging_utils.h" // #include "core_services/common_data_...
TOOL
0.889487
6.376555
54f1ab01-8354-4cb4-b934-45e373744245
zep1994/OpenCV
opencv-4.7.0/opencv-4.7.0/samples/cpp/watershed.cpp
#include <opencv2/core/utility.hpp> #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include <cstdio> #include <iostream> using namespace cv; using namespace std; static void help(char** argv) { cout << "\nThis program demonstrates the famous watershed segmentation ...
ALGO
0.995777
6.151807
c9d5242f-e954-48ae-8558-67a28e50fd9a
komekome09/comp_prog
atcoder/agc034_a.cpp
#include <bits/stdc++.h> #define rep(i, n) for(ll i = 0; i < (n); ++i) using namespace std; using ll = long long; const double PI=acos(-1); int main(){ ll n, a, b, c, d; string s; cin >> n >> a >> b >> c >> d >> s; vector<ll> space; ll cnt = 0; bool exchange = false; for(ll i = min(a-1, b-1...
ALGO
0.999945
3.019307
0934cf07-78a9-4051-9311-0a93aa6b3519
Subhraneel77/Leetcodes-Solutions
1351-count-negative-numbers-in-a-sorted-matrix/1351-count-negative-numbers-in-a-sorted-matrix.cpp
class Solution { public: int countNegatives(vector<vector<int>>& grid) { int n = grid.size(); int ans = 0; for(int i=0;i<n;i++){ int ub = upper_bound(grid[i].rbegin(),grid[i].rend(),-1) - grid[i].rbegin(); ans += ub; } return ans; } };
ALGO
0.999993
6.135499
463c55b0-f532-477d-995b-ef0aa8948697
xucaimao/netlesson
pa3/cy08-01.cpp
/* 程序设计实习MOOC /程序设计与算法(三)第八周测验(2018秋季) 1:goodcopy write by xucaimao,2018-10-24 考察的重点是倒序拷贝 */ #include <iostream> using namespace std; template <class T> struct GoodCopy { // 在此处补充你的代码 public: void operator()(T* s,T* e,T* t){ T* nt=t+(e-s); for(;e>=s;e--,nt--) *nt=*e; } }; int ...
ALGO
0.998987
3.188695
8109f154-b1db-4dcb-b2ab-a95c0a3a084b
sacsachin/programing
ASSIGN.cpp
/* * https://www.spoj.com/problems/ASSIGN/ * Assignment */ # include <iostream> # include <vector> # define cout(n, a) for(int i=0; i<n; i++){std::cout<<a[i];} std::cout<<std::endl; # define cout_nn(n, a) for(int i=0; i<n; i++){for(int j=0; j<n; j++){std::cout<<a[i][j];}std::cout<<std::endl;} # define cout_mn(m, n...
ALGO
0.999861
5.040196
618b6f6b-d66b-434a-a7b2-fa41c44e0946
adityyaa-10/DSA
Recursion/SubSeqWithSumK.cpp
#include <iostream> #include <vector> using namespace std; void getSubsequences(vector<int> &nums, vector<vector<int>> &ans, int i, int n, vector<int> &sub, int sum, int target) { // Base Condition if (i >= n) { if (sum == target) { ans.push_back(sub); } return; ...
ALGO
0.999634
5.675406
c9eec9c3-dd68-47f7-a4ea-3d6ec39e4ad7
xDevanshu-Garg/dsa-practice
Heaps/Lac 1 Implementation/Implementation.cpp
#include <iostream> using namespace std; class heap{ public: int arr[100]; int size = 0; void insert(int val){ size++; int index = size; //We have to insert at end arr[index] = val; while (index > 1){ int parent = index/2; if(arr[parent] < arr[index]...
ALGO
0.999912
4.135528
91f69a6e-b069-42a5-888d-e71dd3c05d56
Risav27/cp_codechef
ATM_Machine.cpp
#include <iostream> using namespace std; int main() { // your code goes here int n; cin>>n; for (int i = 0; i < n; i++) { /* code */ int pp , total; cin>>pp>>total; for(int j = 0; j<pp ; j++){ int unt; cin>>unt; if(unt<=total){ ...
ALGO
0.999683
3.165552
5fde1962-45b9-41f7-9a26-ef1c65bb7f37
himel5113/Problem_solving-
1644A. Doors and Keys.cpp
#include <bits/stdc++.h> #define ll long long #define ld long double #define endl '\n' #define allV(V) (V).begin(), (V).end() #define allA(arr, size) arr, arr+size #define sortV(V) sort(allV(V)) #define revV(V) reverse(allV(V)) #define sortA(arr, size) sort(allA(arr, size)) #define revA(arr, size) reverse(allA(arr, siz...
ALGO
0.999162
4.376646
5561782c-fd8f-4971-8b48-05dfe1ee10c0
catalinhalbes/Proiect-MPP
gs_mpi_base/main.cpp
#include "mpi.h" #include <iostream> constexpr int Cx = 3; constexpr int Cy = 3; constexpr int Cz = 3; constexpr int P = Cx * Cy * Cz; int main(int argc, char* argv[]) { MPI_Init(&argc, &argv); int rank, p; MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &p); //std::cout << "Rank: " << rank...
ALGO
0.952764
4.055882
beec9191-478c-4774-9c47-a4f05379e72c
heavenMOJANG/ICPC
programmes_C_Cpp/.history/AtCoder/abc416/C_20250726201904.cpp
#pragma GCC optimize(3, "Ofast", "inline") #include <bits/stdc++.h> #define int long long using namespace std; constexpr int INF = 0x7fffffff; void solve() { int n, k, x; cin >> n >> k >> x; vector<string> a(n); for (int i{}; i < n; ++ i) cin >> a[i]; string tmp{}; vector<string> ans; function<v...
ALGO
0.999889
5.179546
7fa47d22-d867-482d-9947-8e30862954eb
Grogodems/C-plus-plus
Исключения.cpp
#include <ctime> #include <iostream> #include <cmath> #include <stdio.h> #include <time.h> using namespace std; struct dates { int day1; int month1; int year1; int day2; int month2; int year2; dates(int xday, int xmonth, int xyear, int xday2, int xmonth2, int xyear2) : day1(xday), month1(...
ALGO
0.999705
4.116482
786447c0-a449-4c11-9370-933f7e7dba0c
HCY-ASLEEP/llvm-study
libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/replace_if.pass.cpp
// <algorithm> // template<ForwardIterator Iter, Predicate<auto, Iter::value_type> Pred, class T> // requires OutputIterator<Iter, Iter::reference> // && OutputIterator<Iter, const T&> // && CopyConstructible<Pred> // constexpr void // constexpr after C++17 // replace_if(Iter first, Iter las...
TEST
0.977296
6.960372
9f08f154-85b9-4803-8075-f2e2723036b3
RahulMittal18/Leetcode_solutions
0212-word-search-ii/0212-word-search-ii.cpp
class Solution { public: //we use a trie for storing the words struct TrieNode{ int endsHere; TrieNode* child[26]; }; //create a trieNode and returns it TrieNode* getNode() { TrieNode* newNode=new TrieNode; newNode->endsHere=0; for(int i=0;i<26;++i) ...
ALGO
0.999942
6.454597
a26ab51c-470a-413c-9a4a-753a8fa5f899
StevenSchuerstedt/CMM
exercise/a4-StevenSchuerstedt/ext/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_visitors.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Eigen::MatrixXf m(2,2); m << 1, 2, 3, 4; //get location of maximum MatrixXf::Index maxRow, maxCol; float max = m.maxCoeff(&maxRow, &maxCol); //get location of minimum MatrixXf::Index minRow, m...
ALGO
0.999791
4.010038
346dc454-2b6f-49f0-b9c2-b7d7e9ca4fea
Spirit599/algorithm
leetcode/cpp/337_1.cpp
// 337. 打家劫舍 III /** * 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 *...
ALGO
0.999925
6.11066
2a6ee96d-abdc-484f-b2da-c040803e938d
pratapaditya1997/leetcode
medium/752/sol.cpp
class Solution { public: char Prev(char c) { int x = c - '0'; x = (x - 1 + 10) % 10; return char(x + '0'); } char Next(char c) { int x = c - '0'; x = (x + 1) % 10; return char(x + '0'); } int openLock(vector<string>& deadends, string target) ...
ALGO
0.999951
6.361432
5de6ab47-270d-4e3e-8aea-5bacc5dfc01e
ybouret/yttrium
src/core/y/counting/partition.cpp
#include "y/counting/partition.hpp" #include "y/system/exception.hpp" #include "y/memory/wad.hpp" #include "y/memory/allocator/pooled.hpp" #include "y/counting/c/part.h" #include "y/sequence/list.hpp" #include "y/sequence/vector.hpp" #include "y/system/exception.hpp" #include <cerrno> namespace Yttrium { const ...
ALGO
0.987549
6.147179
27d0ef4e-bd08-40c0-8935-c1bfa827cbda
rkskekzzz/algorithm_cpp
week_07/day_3.cpp
#include <iostream> #include <vector> std::vector<int> dp_vector; std::vector<int> input_vector; int MAX; int n; void output() { for (int i = 0 ; i < n ; i++) { if (!input_vector[i]) std::cout << "1 0\n"; else std::cout << dp_vector[input_vector[i] - 1] << " " << dp_vector[input_vector[i]] << '\n'; } } ...
ALGO
0.999823
3.701237
213581c2-d456-43d2-8547-c127fc2d4e0e
Idlalmaulanawahid/ui-instagram
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.998859
6.785645
8b96cfbb-ff9c-4a8c-91f7-83778737f704
RaJ-3542/LeetcodeSolution-EasyLevel-
0347-top-k-frequent-elements/0347-top-k-frequent-elements.cpp
map<int,int> mp; bool customSort(int &a,int &b){ return mp[a]>mp[b]; } class Solution { public: vector<int> topKFrequent(vector<int>& nums, int k) { vector<int> ans; for(auto a : nums){ mp[a]++; } for(auto it :mp){ ans.push_back(it.first); } ...
ALGO
0.999997
5.910578
7ac61b86-3a4d-4946-b5f7-0408085d316b
aryanguptacsvtu/Coding-in-Cpp
Calendar.cpp
#include <iostream> using namespace std; // Function to check if the year is a leap year bool isLeapYear(int year) { return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0); } // Function to get the number of days in a month int getDaysInMonth(int month, int year) { if (month == 2) { retur...
TOOL
0.981828
5.959408
617a2a32-1ae0-4b03-aa9e-beeef7949cbd
imSarfaroz/Algorithms-and-Data-Structures-2020
lab-02/p35/main.cpp
#include <iostream> using namespace std; int main() { int num1, num2, num3; cin >> num1 >> num2 >> num3; if(num1 > num2){ swap(num1, num2); } if (num1 > num3){ swap(num1, num3); } if(num2 > num3){ swap(num2, num3); } //10 1 4 -> 1 4 10 if (num3 - nu...
ALGO
0.999977
3.975819
9f22444b-4383-4d89-8406-b54a609e6e7b
mikaozora/Programming-C
Data Structures/Lab/template/kruskal.cpp
#include <stdio.h> #include <stdlib.h> #include "linkedlist.cpp" struct Graph { int V; Node *head, *tail; }; Graph createGraph(int V) { Graph g; g.V = V; g.head = g.tail = NULL; return g; } int findParent(int *parent, int pos) { if (parent[pos] == pos) { return pos; } return findParent(parent, parent[pos...
ALGO
0.999268
3.892238
9c20169f-93ab-446a-a413-24fef5d92257
kobeallen/Leetcode
Length of Last Word.cpp
class Solution { public: int lengthOfLastWord(const char *s) { // Start typing your C/C++ solution below // DO NOT write int main() function int length=strlen(s); int pos=length-1, size=0; while(pos>=0&&s[pos]==' ') pos--; while(pos>=0&&s[pos]!=' ') ...
ALGO
0.997719
4.872776
3605cc2b-11d4-4463-a413-607097f8b867
Dakkal/Algorithm
Algorithm/Algorithm/프로그래머스/붕대 감기.cpp
#include <iostream> #include <algorithm> #include <functional> #include <vector> #include <string> #include <map> using namespace std; enum BANDAGE { TIME, RECOVER, EX_RECOVER, BANDANGE_END }; enum ATTACK { ATK_TIME, ATK_DMG, ATK_END}; int solution(vector<int> bandage, int health, vector<vector<int>> attacks)...
ALGO
0.999871
3.905394
91923d51-04f2-4b8d-975c-997838153eab
harshaldotcpp/data-strutures-algorithms
Graph/motherVertexUnoptimize.cpp
#include <iostream> #include <set> #include <vector> using namespace std; void dfs(vector<int> adj[], int starting,set<int> &visited){ visited.insert(starting); for(auto node : adj[starting]){ if(visited.find(node) == visited.end()){ dfs(adj,node,visited); } } } int motherVertex(vector<int> adj[],int n){ ...
ALGO
0.999906
5.055974
2be9af66-a578-4141-a4f5-86e9e578a41b
vandan08/LeetCode_100_Days
Day_38/GroupsOfAnagrams.cpp
#include<bits/stdc++.h> using namespace std; class Solution { private: string strSort(string s){ int count[26]={0}; for(char c:s){ count[c-'a']++; } string t; for(int i=0;i<26;i++){ t+=string(count[i],i+'a'); } return t; } public: vector<vector<string>> groupAnagrams(ve...
ALGO
0.999988
6.263097
8ad07fa4-3c1e-4d5e-a4e6-0a2cdbabe22e
Eurususu/Eigen3
failtest/colpivqr_int.cpp
#include "../Eigen/QR" #ifdef EIGEN_SHOULD_FAIL_TO_BUILD #define SCALAR int #else #define SCALAR float #endif using namespace Eigen; int main() { ColPivHouseholderQR<Matrix<SCALAR,Dynamic,Dynamic> > qr(Matrix<SCALAR,Dynamic,Dynamic>::Random(10,10)); }
TEST
0.978846
3.159166
0c2639f1-40b0-472b-8dc2-73ed1c602d3b
0-jij-0/CompetitiveProgramming
Official ACM-ICPC Contests/SCPC 18 (CEFJL Unsolved)/Tourists' Tour.cpp
#include <iostream> #include <vector> #include <stack> #include <algorithm> #include <queue> #include <string> #include <cassert> #include <climits> using namespace std; struct edge { int u, v; edge() {} edge(int _u, int _v) : u(_u), v(_v) {} }; struct node { vector<edge> edges; }; struct graph { vector<node> n...
ALGO
0.999901
4.230487
9bc969e0-a120-42d9-829d-eabab99fb194
yanyiss/BalanceSolver
eigen3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_operatornorm.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { MatrixXf m(2,2); m << 1,-2, -3,4; cout << "1-norm(m) = " << m.cwiseAbs().colwise().sum().maxCoeff() << " == " << m.colwise().lpNorm<1>().maxCoeff() << endl; cout << "infty-norm(m...
ALGO
0.999758
4.076589
073e2a00-2683-4c46-8538-6a4d37ed7ec2
MaksSt33/oop-lab3.1
oop lab3.1.cpp
#include <iostream> #include "Real.h" #include <Windows.h> using namespace std ; int main() { SetConsoleCP(1251); SetConsoleOutputCP(1251); Real r1, r2; cout << "Введіть значення для першого числа: "; cin >> r1; cout << "Введіть значення для другого числа: "; cin >> r2; cout << "\nВведені ч...
TOOL
0.868195
3.456663
d8ae8f9f-c119-4198-9388-5e1a462572f1
libgeos/geos
src/operation/valid/IsSimpleOp.cpp
#include <geos/operation/valid/IsSimpleOp.h> #include <geos/algorithm/BoundaryNodeRule.h> #include <geos/algorithm/LineIntersector.h> #include <geos/geom/Coordinate.h> #include <geos/geom/Geometry.h> #include <geos/geom/GeometryCollection.h> #include <geos/geom/LineString.h> #include <geos/geom/MultiPoint.h> #include ...
ALGO
0.994638
6.456027
387bb53c-00fc-449a-be48-1e6ad04a0f76
Siddharth3271/Leetcode-Problems
removeoutermostparenthesis.cpp
#include<iostream> #define MAX 100000 using namespace std; void pop(int st[], int *top) { if (*top == -1) { cout << "STACK UNDERFLOW" << endl; //return -1; // Return an invalid value for underflow } else { st[(*top)--]; // Return the top element and decrement } } void push(int st[...
ALGO
0.999556
5.621027
3308ef2c-6cfe-41c5-a649-fd9ddbc3cd57
visitorckw/leetcode-solution
AC_submissions/628.maximum-product-of-three-numbers.566560049.ac.cpp
/* * @lc app=leetcode id=628 lang=cpp * * [628] Maximum Product of Three Numbers */ // @lc code=start class Solution { public: int maximumProduct(vector<int>& nums) { const int size = nums.size(); sort(nums.begin(), nums.end()); return max(nums[size-1]*nums[size-2]*nums[size-3], nums[0]...
ALGO
0.999889
5.891376
55b69d5c-e04b-4c34-806b-b3ba73616d0d
AkshayRamchandraDhole/Python
Python Code/Daily_Flash_Code_0/Week9/18Mar/50-DailyFlash_Solutions/18_Mar/CPP/program3.cpp
#include <iostream> int main () { int n,i,fact = 1,sum,temp; std::cout << ("Enter Numbers : "); do { std::cin >> n; fact = 1; temp = n; sum = 0; while(n != 0){ fact = 1 ; for(int i = 1; i <= n%10 ;i++){ fact = fact * i; } if(n%10 == 0) fact = 1; sum = sum + fact; n = n / 10; ...
ALGO
0.999467
4.493604
c35b6e1f-e9a5-4842-906c-f2878ac2a74a
happya/MOOC-Object-Oriented-Programming-with-Cpp
Course projects/war1/wow.cpp
/* * ex5.cpp * * Created on: 2018917 * Author: yyiust * * ch5:̳ */ #include <cstdio> #include <iostream> #include <string> using namespace std; //red: iceman,lion,wolf,ninja,dragon //blue:lion, dragon,ninja,iceman,wolf //input:dragon,ninja,iceman,lion,wolf class tribe; class warrior{ private: tribe *pt...
ALGO
0.996626
3.533296
0d67727b-638a-4236-8bee-29f0222ce09e
sahilnare/acm-icpc-prob
codeforces/codeforces23.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n, i, j; cin >> n; vector<vector<char>> board(n, vector<char>(n, 'A')); for(i = 0; i < n; i++) { for(j = 0; j < n; j++) { if((i + j) % 2 == 0) { board[i][j] ...
ALGO
0.999377
3.67705
f729b6b7-5710-4cd5-9d4c-e3bfa6c43bac
sway-am/Submissions
E_Min_Max_MEX.cpp
// DNB // C++ #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #include <bits/stdc++.h> #define nl "\n" #define F first #define S second #define vin(v,n) for(int i = 0; i<n; i++){cin>>v[i];} #define all(v) v.begin(), v.end() #define space " " #define int long long int #define INF...
ALGO
0.999959
5.323684