uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
6d160943-c86c-4edd-9f02-3f33a8dc08d3
raincross7/code-similarity
codes/train_code/problem005/problem005_65.cpp
#include<iostream> #include<stdio.h> //#include <bits/stdc++.h> #include<vector> #include<float.h> #include<iomanip> #include<algorithm> #include<string> #include<cstring> #include<math.h> #include<cmath> #include<sstream> #include<set> #include<map> #include<...
ALGO
0.999973
3.987314
379407f0-3884-44cb-bb47-48dba2ef043d
kmjp/procon
atcoder/abc151-200/abc154/c.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.999857
3.928069
97b9a7ce-9ca3-4a51-919a-6832185acb47
natigeorgieva/UP-2019-2020
Additional ex 2/Solutions/var1/task2.cpp
/** В случая тази програма само намира кои числа се срещат 'k' на брой пъти в масива и записва в резултатния само веднъж числото отговарящо на изискването. Според мен се получава двусмислица между условите и примера, така че съм решил по трудния вариянт. Ако искате да ви изпечата както в примера не е нужно да сортирате...
ALGO
0.999838
3.334196
4b0808a1-d3fd-4fcc-b0e1-b7976fa2073a
knwoo/e2map
src/navigation/planning/path_tracker/src/path_tracker.cpp
#include "path_tracker.h" PathTracker::PathTracker(std::string pkg_loc){ PathTracker::_SetConfig(); _path_gen = new DummyPathGenerator(pkg_loc, _DL); if (_Regressor_Type == "Poly"){ _path_reg = new Regressor(_Order, _Window, _DL, _verbose); } else if (_Regressor_Type == "Spline"){ _pa...
TOOL
0.991388
3.484909
5e0bdc8a-a40c-4ecd-99cc-29201530d52e
adityaa30/programs
Dynamic Programming/MinPartitionDifference.cpp
#include <bits/stdc++.h> using namespace std; int MinPartitionDifference(vector<int> vals) { const int N = vals.size(); int sum = 0; for (int x : vals) sum += x; bool dp[N][sum + 1]; int minDiff = sum; for (int S = 0; S <= sum; ++S) { for (int i = 0; i < N; ++i) { if (S == 0) dp[i][S...
ALGO
0.999915
5.1442
e1bd6aeb-75b1-482d-84ba-19f4ff67bcc6
Hemantgithubpro/leetcode
Codeforces/Lists/TLE_Eliminators/900/16/main2.cpp
#include <bits/stdc++.h> using namespace std; void solve() { string s1, s2; cin >> s1 >> s2; unordered_map<char,int> um; } int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif ios::sync_with_stdio(false); cin.tie(NULL); /...
ALGO
0.999767
5.411941
2e01f438-1786-4831-8bd4-bcad67b0e743
sifat-hossain-niloy/LLMs-Performance-in-ICPC-Problems
Solution-Codes/2021/O1-Mini/F.cpp
#include <bits/stdc++.h> using namespace std; const double PI = acos(-1.0); const double INF = 1e18; // Structure for a point struct Point { double x, y; }; // Structure for a flight path struct FlightPath { Point A; double Az; Point B; double Bz; // Direction vectors double ux, uy; d...
ALGO
0.999941
5.307495
b537200d-29ce-4f11-a41d-b9e71cda86fb
irena2/bioinf-vbwt
src/bwt.cpp
#include "bwt.h" #include <cstring> // Calculates bijective variant of BWT using sais_bwt std::string bwt (std::string x) { const unsigned char* T = reinterpret_cast <const unsigned char*> (x.c_str()); unsigned char* U = (unsigned char*) malloc(sizeof(unsigned char) * x.length()); int* A = (int*) malloc(sizeof(int...
ALGO
0.999093
4.62536
7af17bc7-0826-4792-90a3-d79930dbeebf
nataliator/sandbox
codilityCauntElFrogRiverOne/main.cpp
#include <iostream> #include <algorithm> using namespace std; int solution(int X, vector<int> &A){ int leafBridge[X+1]; int couter = 0; int result = -1; for(int i = 0; i < X+1; i++){ leafBridge[i] = 0; } for(int i = 0; i < A.size(); i++){ if (leafBridge[A[i]] == 0){ couter++; } leafBridge[A[i...
ALGO
0.999929
4.66884
7ad31648-8897-446d-a4f3-958e9babc213
rimi-here/coding-files
graph_1/main.cpp
#include <bits/stdc++.h> using namespace std; /* //adjacency matrix int arr[ 10][10] ; void disp( int v ){ for( int i= 0 ; i <v ; i++){ for( int j= 0 ; j <v ; j++){ cout << arr[i][j] ; } cout << "\n" ; } } void add_edge( int u , int v ){ arr[u][v] = 1 ; arr [v][u] = 1; }...
ALGO
0.99995
4.506911
e36e5861-9b3a-44bc-8209-d5f59ec1d751
thong3le/leetcode
cpp/_363_max_sum_of_rectangle_no_larger_than_k.cpp
/* * Author: Thong Le * Date: * * LeetCode 363 - Max Sum of Rectangle No Larger Than K * * Solution Approach: * * * */ #include <iostream> #include <algorithm> #include <vector> #include <set> #include <unordered_map> using namespace std; class Solution { public: int func() { return 0; } }; i...
ALGO
0.99939
5.104623
79bf72e3-277a-4f15-a1b9-d3d4a121bc16
Tinganz/speech_ncnn
ncnn/src/layer/arm/absval_arm.cpp
#include "absval_arm.h" #if __ARM_NEON #include <arm_neon.h> #endif // __ARM_NEON namespace ncnn { AbsVal_arm::AbsVal_arm() { #if __ARM_NEON support_packing = true; #endif // __ARM_NEON } int AbsVal_arm::forward_inplace(Mat& bottom_top_blob, const Option& opt) const { int w = bottom_top_blob.w; int h = ...
ALGO
0.987988
6.335075
a95417a1-90a0-4861-bb89-cbe69a6d8c3c
Adarsh-singh-2002/DSA_
Array/equilibrium_point.cpp
//{ Driver Code Starts #include <iostream> using namespace std; // } Driver Code Ends class Solution{ public: // Function to find equilibrium point in the array. // a: input array // n: size of array int equilibriumPoint(long long a[], int n) { // Your code here //brut...
ALGO
0.999817
5.957438
ad40f230-33ac-4955-8644-5ec5a8b20f3c
archar001/Heroic
dep/g3dlite/source/fileutils.cpp
/** @file fileutils.cpp @author Morgan McGuire, graphics3d.com @author 2002-06-06 @edited 2010-02-05 */ #include <cstring> #include <cstdio> #include "G3D/platform.h" #include "G3D/fileutils.h" #include "G3D/BinaryInput.h" #include "G3D/BinaryOutput.h" #include "G3D/g3dmath.h" #include "G3D/stringutils.h" #...
TOOL
0.915896
5.941722
cce5305e-8e44-4ea1-bd44-b4ddbbb6c833
M1nhbui/Competitive-Programming
020122/dayso10.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<long long, long long> pll; typedef pair<int, int> pii; #define MAXN 900005 #define MAX 100 #define ll long long #define ll long long #define ull unsigned long long #define endl "\n" #define FOR(i, l, r) for (int i = l; i <= r; i++) #define FOD(i, r, l) for (...
ALGO
0.99994
3.947615
962332e7-6ea2-451b-9565-40bc6cf2de4e
rsy56640/Assignment-in-WHUISS
Principle_of_Compiling/Interpreter construction/1st/main.cpp
/* Sample input format: * 1: G[N] // * 2: N D // one space seperated * 3: N::=ND|D // one line per production * n: D::=0|1|2|3|4 // e represents epsilon * * Sample output format: * 1: G[N] = ({N, D}, {0, 1, 2, 3, 4}, P, N) *...
ALGO
0.87157
5.918939
2a18f9fe-da22-448c-92f7-b4252ae60ddd
kkyehit/Algorithm2
Backjoon/10816/src1.cpp
#include <stdio.h> #include <iostream> #include <cstring> #define MAX_N 500000 #define MAX_M 500000 #define MAX_V 10000000 using namespace std; int v[MAX_V*2 + 1]; int n, m; int main(void){ int a; memset(v, 0, sizeof(v)); scanf("%d", &n); for(int i = 0; i < n; i++){ scanf("%d",&a); v[a + MAX_V]++; } scanf...
ALGO
0.999883
3.652595
e064f874-52f2-4f79-a26a-567ccdd14f4b
plctlab/llvm-project
llvm/lib/Support/StringExtras.cpp
#include "llvm/ADT/StringExtras.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/raw_ostream.h" #include <cctype> using namespace llvm; /// StrInStrNoCase - Portable version of strcasestr. Locates the first /// occurrence of string 's1' in string 's2', ignoring case. Returns /// the offset of s2 in s1 or...
TOOL
0.962335
6.856458
5d2875d8-8ddb-4365-a6d0-25851b8bea84
saptarshi-mondal-12/DSA-Revision
9. Binary Tree/50_Largest_subtree_sum.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; /* Q. Largest subtree sum in a tree Given a binary tree. The task is to find subtree with maximum sum in the tree and return its sum. Input: 1 / \ 2 3 / \ / \ 4 5 6 7 Output: 28 Ex...
ALGO
0.999976
6.14151
e7423a46-fcc0-4cc7-b90f-320473fefc22
Jhecks/ITMO-Algorithms-and-Data-Structures
Lab 3/Lab_4.cpp
#include <fstream> #include <vector> using namespace std; long n = 0; vector<pair <long, long>> inData; void siftDown(int i) { int help = i; int left = 2 * i + 1; int right = 2 * i + 2; if (left < n && inData[left].first < inData[i].first) help = left; if (right < n && inData[right].firs...
ALGO
0.999976
3.66196
8f66c333-0c42-4d1b-8bb7-86212711bd86
ishandutta2007/codeforces
qwqcorz/normal/1147/A.cpp
#include<bits/stdc++.h> using namespace std; const int N=1e5+5; int read() { int s=0; char c=getchar(),lc='+'; while (c<'0'||'9'<c) lc=c,c=getchar(); while ('0'<=c&&c<='9') s=s*10+c-'0',c=getchar(); return lc=='-'?-s:s; } void write(int x) { if (x<0) { putchar('-'); x=-x; } if (x<10) putchar(x+'0'); els...
ALGO
0.999854
3.579569
2928fa0e-b841-44ab-998d-d91c2352c5ff
ege-saygili/bldc-tester
.pio/libdeps/esp32doit-devkit-v1/Simple FOC/src/common/foc_utils.cpp
#include "foc_utils.h" // function approximating the sine calculation by using fixed size array // uses a 65 element lookup table and interpolation // thanks to @dekutree for his work on optimizing this __attribute__((weak)) float _sin(float a){ // 16bit integer array for sine lookup. interpolation is used for bette...
TOOL
0.992558
6.900334
7039d94a-9b74-46b4-aa42-7c3f2529f128
myousuf65/cpp_webserver
dependencies/boost/libs/compute/perf/perf_partition_point.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> #include <boost/compute/system.hpp> #include <boost/compute/lambda.hpp> #include <boost/compute/algorithm/partition.hpp> #include <boost/compute/algorithm/partition_point.hpp> #include <boost/compute/container/vector.hpp> #include "perf.hpp...
ALGO
0.991659
5.911248
b0a6a8ca-f7d5-4f15-bb26-e7cf183ded51
zahinwahab/Reliable-Transport-Protocol-Implementation-CSE322
Source code/rdt_gbn_23.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include<unistd.h> #include<queue> #include<string.h> #include<stack> using namespace std; FILE *fp; /* ****************************************************************** ALTERNATING BIT AND GO-BACK-N NETWORK EMULATOR: SLIGHTLY MODIFIED FROM VERSION 1.1 of ...
ALGO
0.99395
3.762989
3e073393-27d7-4c4b-8e73-1d0c782b0249
ktbolt/ProteinMechanica
code/pm/src/ode_solv.cpp
//*============================================================* //* ode_solv: O D E s o l v e r * //*============================================================* // interface to the OpenDynamicsEngine. #include "ode_solv.h" #include "pm/mth.h" // debug symbols // //#define dbg_PmOdeS...
ALGO
0.991485
5.067586
20a2cb18-2512-4cc2-9ffc-9cff69013816
koughua/Homework_cs106b
code/collatz/lib/StanfordCPPLib/shuffle.cpp
#include "shuffle.h" using namespace std; /* * Randomly rearranges the characters of the given string and returns the * rearranged version. */ string shuffle(string s) { for (int i = 0, length = s.length(); i < length; i++) { int j = randomInteger(i, length - 1); if (i != j) { string...
ALGO
0.858846
5.749201
8fbbe464-6c9d-433c-86c5-92d0c04ba28a
Nitesh0409/DSA_sheet
array/majorityElement_i.cpp
// question link : https : // leetcode.com/problems/majority-element/description/ #include<bits/stdc++.h> using namespace std; class Solution{ public: // brute force : just check every element and count appearence, if greater then n/2..solution // t => O(n^2), s => O(1) int majorityElement_brute(vector<i...
ALGO
0.999899
5.241067
e5c67ee8-669f-4790-9cb6-b6f182082349
leenaaq/Practice
프로그래머스/1/133502. 햄버거 만들기/햄버거 만들기.cpp
#include <string> #include <vector> #include <iostream> #include <algorithm> using namespace std; int solution(vector<int> ingredient) { int answer = 0; vector<int> stack; for (int x : ingredient) { stack.push_back(x); if (stack.size() >= 4 && stack[stack.size() - 4] == 1 && ...
ALGO
0.99947
5.691731
55a03116-dd9c-4c45-8f61-878ab9926801
DevanandDev/Provider_Examples
change_text/textsize/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.99594
6.76775
e33bdc22-deec-4bbd-b187-b06d390cb2bd
BlackcoinDev/blackcoin-amore
src/util/message.cpp
#include <hash.h> // For CHashWriter #include <key.h> // For CKey #include <key_io.h> // For DecodeDestination() #include <pubkey.h> // For CPubKey #include <script/standard.h> // For CTxDestination, IsValidDestination(), PKHash #include <serialize.h> // For SER_GETHASH #i...
TOOL
0.903684
6.912498
e03767e3-583c-4626-a580-a2477f0f2b75
Dragon-oniv/packages_apps_ColtOTA
jni/boost_1_57_0/libs/graph/test/random_spanning_tree_test.cpp
// Authors: Jeremiah Willcock // Andrew Lumsdaine #include <boost/graph/random_spanning_tree.hpp> #include <boost/graph/grid_graph.hpp> #include <boost/array.hpp> #include <boost/random.hpp> #include <boost/property_map/shared_array_property_map.hpp> #include <boost/property_map/dynamic_property_map.hpp> #i...
ALGO
0.90425
5.152225
a6a69f77-9323-4fac-87e7-ac6f66db9e83
rachit-geek/code-daily
codeforces/domino.cpp
//domino.cpp // codeforces.cpp #include<bits/stdc++.h> using namespace std; int main() { int t;cin>>t;while(t--) { int n,k1,k2; cin>>n>>k1>>k2; int w,b; cin>>w>>b; int white=k1+k2; int black=2*n-white; if(2*w<=white and 2*b<=black) {cout<<"YES"<<endl; ...
ALGO
0.999213
3.491186
351c3c05-8105-4a00-8de8-3100e5761233
Gggguns/programmingLearning
c++/text_2024_4_5_op_31.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<unordered_map> #include<vector> using namespace std; class Solution { public: int findMaxLength(vector<int>& nums) { int n = nums.size(), Ret = 0; long long Sum = 0; unordered_map<int, int> hash; for (int i = 0;i < n;i++) { ...
ALGO
0.999968
5.178293
6f043113-d2a1-486b-9fc0-251dd314c85f
ksobrenat32/cpcfi
contests/codeforces/Round 1030/C.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define FO(i, b) for (int i = 0; i < (b); i++) #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define rFOR(i, a, b) for (int i = (a); i > (b); i--) #define TR(v, arr) ...
ALGO
0.999715
4.4072
f97fe186-3761-49c5-906d-51a994d7bab9
rockercheng/ProjectEuler
src/No2_Fibonacci.cpp
#include "No2_Fibonacci.h" int Fib::sum (int upper) { int prev1 = 2, prev2 = 1, newFib = 0, sum = 0; newFib = prev1 + prev2; sum += prev1; while (1) { if (newFib % 2 == 0) { sum += newFib; } prev2 = prev1; prev1 = newFib; newFib = prev1 + prev2; if (newFib > upper) { break; } } retur...
ALGO
0.999099
4.23435
40804c43-e6be-4a6b-b87a-e897d1ad82b7
June-24/Computer_Networks_Learnings_and_Assignments
GDB all versions/GDB.2/GDBServer.cpp
#include <bits/stdc++.h> #include <sys/poll.h> #include <unistd.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/types.h> #include<sys/wait.h> using namespace std; int main() { // opening fifos and making them ready mkfifo("IN1", 0666);int ffd1 = open("IN1", O_RDONLY | O_NONBLOCK); mkfifo("IN2", 0...
TEST
0.857127
3.253965
bd9cebbd-8a54-474d-bdb8-8cb4425dd3c6
bdiv/heuristics_ops1516
src/ants/Ant.cpp
#include <iostream> using namespace std; class Ant{ public: int * path; //Abfolge der von der Ameise besuchten Knoten am aktuellen Pfad int path_hops; //Anzahl der von der Ameise besuchten Knoten am aktuellen Pfad double path_length; //Länge des bisher von der Ameise zurückgelegten Weges am aktuellen Pfad inli...
ALGO
0.983147
3.050899
2439ed78-bffc-411e-89b4-fb7da826d8c4
zjsxzy/binarysearch
123 Number Flip/main.cpp
#include <bits/stdc++.h> using namespace std; #define PB push_back #define SZ(v) ((int)(v).size()) #define abs(x) ((x) > 0 ? (x) : -(x)) typedef long long LL; int solve(int n) { int b = 1e9; for (int i = 0; i < 10; i++) { int d = n / b % 10; if (d > 0 && d < 3) { // cout << b << " "...
ALGO
0.998993
4.078075
7573ba0f-7205-4a2c-80a6-b18d3f6010ef
borntofrappe/flutter-beginners-tutorial
quotes_list/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.997283
6.787361
f55dcc07-dc0d-495f-8d0f-2bbb347160b9
nikunjmathur08/Advent_of_code
day10.cpp
#include <fstream> #include <iostream> #include <string> #include <vector> #include <sstream> #include <algorithm> #include <regex> #include <unordered_set> #include <cassert> #include <queue> using namespace std; int main() { fstream newfile; newfile.open("day10.txt", ios::in); if (newfile.is_open()) ...
ALGO
0.999674
6.917646
131ff632-e406-4731-8d79-ad79dbbc897a
Damns99/MNF_repo
MODULO_1/ising/timing_test.cpp
#include <iostream> #include <vector> #include <chrono> #include "ran2.h" #include <math.h> #include <cassert> constexpr int SEED = -42; constexpr int LENGTH = 128; constexpr int REPETITIONS = 1000000; constexpr int LOOPS = 10; #define pacman(I, L) (((I) >= 0) ? ((I) % (L)) : ((L) - (((L) - (I)) % (L)))) #define ind...
TOOL
0.889908
3.336007
1a14c87c-1898-403c-8f3a-b8d003035f91
SBidaibek/acm
atcoder/grand26/a.cpp
#include <bits/stdc++.h> using namespace std; #define forn(i, x, n) for (int i = int(x); i <= int(n); ++i) #define for1(i, n, x) for (int i = int(n); i >= int(x); --i) #define x first #define y second #define pb push_back typedef long long ll; typedef pair <int, int> pii; typedef long double ld; typedef vector <ll> ...
ALGO
0.999914
4.067212
5f97bc2f-2ae2-4d66-a268-b56e185f8d38
xJoelFMRx/Competitive_Programming
Codeforces/Problemset/A+B_Again/a+b_again.cpp
#include "iostream" #include "string" #include "vector" using namespace std; int main(){ int n; cin >> n; vector<string> numeros(n); for (int i = 0; i < n; i++){ cin >> numeros[i]; } for (int i = 0; i < numeros.size(); i++){ int sumaDigitos = 0; for (int j = 0; j < nume...
ALGO
0.999542
5.09328
1854d7ba-1035-471a-8e38-98a5dddfd286
ouyen/leetcode_offer
剑指 Offer 09.用两个栈实现队列-lcof.cpp
/* * @lc app=leetcode.cn id=剑指 Offer 09 lang=cpp * @lcpr version=21913 * * [剑指 Offer 09] 用两个栈实现队列 */ using namespace std; #include<bits/stdc++.h> // @lc code=start class CQueue { stack<int> _in; stack<int> _out; public: CQueue() { } void appendTail(int value) { _in.push(value); ...
ALGO
0.999726
5.883097
f32c9407-e621-409f-8857-611d0f6a301e
SakshiKhadilkar/365-Days-Leetcode-Challenge
1457-pseudo-palindromic-paths-in-a-binary-tree/1457-pseudo-palindromic-paths-in-a-binary-tree.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.999888
5.810319
68207b2b-af12-480b-a475-209e353d7ac7
malandante/Commercium-TESTNET
src/commercium-cli.cpp
#if defined(HAVE_CONFIG_H) #include "config/commercium-config.h" #endif #include "chainparamsbase.h" #include "clientversion.h" #include "rpc/client.h" #include "rpc/protocol.h" #include "util.h" #include "utilstrencodings.h" #include <boost/filesystem/operations.hpp> #include <stdio.h> #include <event2/buffer.h> #i...
WEB
0.979419
6.607731
12feaea7-e286-408c-a566-b6766061f3ff
raincross7/code-similarity
codes/train_code/problem182/problem182_208.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int a, b, c, d; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> a >> b >> c >> d; if (a + b > c + d) { cout << "Left" << endl; } else if (a + b < c + d) { cout << "Right" << endl; } else {...
ALGO
0.999972
4.188339
2cea31c9-67cc-494f-a3a3-fa8897606107
ARahmanAR/Cpp-learning
2dArrays/max.cpp
#include <iostream> using namespace std; int main() { int arr[4][2] = {{01, 81}, {02, 75}, {03, 72}, {04, 90}}; int mx = INT_MIN; for (int i = 0; i < 4; i++) // 4 rows { for (int j = 0; j < 2; j++) // 2 columns { mx = max(mx, arr[i][j]); } } cout << mx << ...
ALGO
0.999225
4.043943
8a0f430a-be55-471e-8ee5-eaa6755007de
ChicLee0819/WM-test
src/time_utility.cpp
#include <cstdio> #include <string> #include <array> #include <sstream> #ifdef _WIN32 #else #include <unistd.h> #endif #include <QDebug> #include "./include/utility.h" #include "./include/time_utility.h" const char* TYPE_ACTIVE = "active"; const char* TYPE_INACTIVE = "inactive"; // Network Time Synchronization confi...
TOOL
0.905731
5.468287
32fca1ce-8b3a-4c9f-a8ae-00a55dc4647e
tanyardr/hackerrank
Tree_inOrder_Traversal.cpp
/* you only have to complete the function given below. Node is defined as struct node { int data; node* left; node* right; }; */ void inOrder(node *root) { if (root == NULL) return; inOrder(root->left); cout<<root->data<<' '; inOrder(root->right); }
ALGO
0.999925
5.474967
f8933bd0-e570-4286-a1e2-ab487688b60d
aarushi-1601/GFG
Hard/Circle of strings/circle-of-strings.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: int dfs(int node,vector<int>g[],vector<int>&vis){ vis[node]=1; int ans=g[node].size(); for(auto i:g[node]) ...
ALGO
0.999984
5.745569
a7999e73-ad64-41eb-b117-47ddaa9d92a7
Cmput416F21/PyGlueTokenizer
CodeGen-main/data/transcoder_evaluation_gfg/cpp/MIRROR_CHARACTERS_STRING.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; string f_gold ( string str, int n ) { string reverseAlphabet = "zyxwvutsrqponmlkjihgfedcba"; int l = str . length ( ); for ( int i = n; i < l; i ++ ) s...
ALGO
0.998841
5.320426
798304aa-4d9e-40a7-adf3-f30c3532d064
Blacegg/C_Cpp_Study
C++/C++Practice_Program/C++Practic_4/2023.10.9.cpp
#include <iostream> using namespace std; #include <functional> #include <vector> #include <algorithm> #include <string> #include <ctime> void test1() { plus<int> p; cout << p(10, 20) << endl; negate<int> n; cout << n(50) << endl; equal_to<int> eq; cout << eq(1, 1) << endl; } // - for_each ...
TOOL
0.951316
4.357382
037dae75-fd72-40d3-b758-03b2d3187060
itsmegauri/kuber_steels
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
951aed45-8259-46fe-baef-da21bf7cb768
DonnieNewell/lavalab
SL/trunk/FaustValente/Examples/hotspot-main.cpp
// -*- Mode: C++ ; c-file-style:"stroustrup"; indent-tabs-mode:nil; -*- #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include "hotspot.h" #include "Model.h" /* maximum power density possible (say 300W for a 10mm x 10mm chip) */ #define MAX_PD (3.0e6) /* required precision in degrees */ #define PRECISI...
ALGO
0.997298
5.000376
60eda4f1-c8eb-4ab9-88eb-b13193f87522
novcsndr/DictionaryTree
main.cpp
#include<iostream> #include<string> #include<fstream> #include<algorithm> #include<iomanip> using namespace std; struct Display { string words;; int count; }; struct Node { Display value; Node* pLeft; Node* pRight; }; Node* add(Node* tree, Display value); Node* addNode(Node* tree, Node* toAdd); bool treeConta...
ALGO
0.948036
4.253731
27c26eba-13f1-44bb-a1ca-d8269006abfb
nisargasle3012/DSA_CODES
21_ROTTING_ORANGES.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; int bfs(vector<vector<int>>& grid, vector<pair<int, int>>& rot, int r, int c) { int time = 0; queue<pair<int, int>> q; for (auto& p : rot) { q.push(p); } q.push({-1, -1}); // Level separator while (!q.empty(...
ALGO
0.999924
6.776653
a9cb5319-d7e1-4e4b-aaa3-6f2ab87bf6c1
LLIKKE/Data-structures-and-algorithms
MGraph/BFST.cpp
#include<stdio.h> #include <cstdlib> #include "string.h" #define FLASE 0 #define TRUE 1 typedef struct ArcNode{ char adjvex[4]; struct ArcNode *nextarc; }ArcNode; typedef struct VNode{ char vexchar[4]; ArcNode *firstarc=NULL; }node[31]; struct mgraph{ node vex; int vexnum; int arcnum; }mgrap...
ALGO
0.999952
3.527726
6e2e4280-5f29-4da6-914d-fab338848390
Andrew-Velox/XPSC
WEEK 10/08-07-2024/E_Vlad_and_an_Odd_Ordering.cpp
#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; #ifdef velox #include "debug.h" #else #define debug(x...) #endif #define ll long long #define srt(v) sort(v.begin(),v.end()) #define grtsrt(v) sort(v.begin(),v.end(),gr...
ALGO
0.999849
4.325548
6d4af84c-34db-4d62-bf60-b417cad689b2
srinivasulugajula/Cpp-Training
Practice/jagged array.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int rows=3; int*jaggedarray[rows]; jaggedarray[0]=new int[2]; jaggedarray[1]=new int[5]; jaggedarray[2]=new int[3]; for(int i=0;i<rows;i++){ for(int j=0;j<(i==0?2:i==1?5:3);j++){ jaggedarray[i][j]=i*j+1; } }...
ALGO
0.997056
3.150074
7edba6a0-01d2-4cdc-8947-42cdd15620f5
jiwooh/cnsh_files
subject__information_science/pyu-Graph03.cpp
#include <stdio.h> #include <vector> int v, e; std::vector<int> G[10]; int main() { int v1, v2; scanf("%d %d", &v, &e); for (int i=1;i<=e;i++) { scanf("%d %d", &v1, &v2); G[v1].push_back(v2); } for (int i=1;i<=v;i++) { printf("%d: ", i); for (int j=0;j<G[i].size();j+...
ALGO
0.999857
3.73867
d2147b68-81bb-4e59-b391-092f5eb9e4d7
jeeridurgarao/myphr
src/crypto/scrypt.cpp
#include "crypto/scrypt.h" #include "uint256.h" #include "utilstrencodings.h" #include <openssl/sha.h> #include <string> #include <string.h> #include <stdint.h> static inline void be32enc(void *pp, uint32_t x) { uint8_t *p = (uint8_t *)pp; p[3] = x & 0xff; p[2] = (x >> 8) & 0xff; p[1] = (x >> 16) & 0x...
ALGO
0.998799
5.312294
0a70424a-ca1c-4377-9316-d1242b852ffd
DevleenaBanerjee/Stock_Prediction_ds
venv/Lib/site-packages/pystan/stan/lib/stan_math/lib/boost_1.69.0/libs/compute/perf/perf_bolt_sort.cpp
#include <algorithm> #include <cstdlib> #include <vector> #include <bolt/cl/sort.h> #include <bolt/cl/copy.h> #include <bolt/cl/device_vector.h> #include "perf.hpp" int main(int argc, char *argv[]) { perf_parse_args(argc, argv); std::cout << "size: " << PERF_N << std::endl; ::cl::Device device = bolt::...
ALGO
0.993241
5.063756
efa93673-641b-4e68-845a-c8fd429b4718
JJH-Log/BaekjoonOnlineJudgeSolvedList
202106/6M1W/B15824.cpp
#include <iostream> #include <vector> #include <string> #include <map> #include <queue> #include <stack> #include <utility> //pair 사용 #include <algorithm> //reverse 사용 #include <math.h> // sqrt 사용 #include <set> #define MOD 1000000007 //for (const auto& i : v) cout << i << ' '; using namespace std; using lld = long lo...
ALGO
0.99998
4.076773
f9b82c51-d6b4-4deb-afd0-227809f2d174
Amitkumarsharma7082/DSA_CPP
1 Basic DSA/4 STL C++/5_Stack.cpp
#include<bits/stdc++.h> using namespace std; void explainStack() { // stack is used while to print the element stack<int> st; st.push(1); st.push(7); st.push(71); st.push(73); st.push(17); st.push(27); /* In this stack we have only two element like 1 & 7 last element 7 so when we top()...
ALGO
0.99414
4.054739
0b678a1e-3cd6-411a-b63c-e38ab3f049fd
YOGENDRA311/Coding_Problems
pyra.cpp
#include<stdio.h> int main(){ int i,j; for(i=1;i<6;i++){ for(j=1;j<=i;j++){ printf("%d ",i*i); }printf("\n"); } }
ALGO
0.996471
3.282847
88d88b58-ecaf-4921-b64a-55faf35ac3cb
Sani1189/tips_calculator
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
1355f68d-78ab-4f1e-aead-c2e8d64501e6
RHJihan/problem-solving
CodeForces/1703/1703A.cpp
// https://codeforces.com/contest/1703/problem/A #include <iostream> using namespace std; int main() { #ifndef ONLINE_JUDGE (void)!freopen("input.txt", "r", stdin); // (void)!freopen("output.txt","w", stdout); #endif int t; cin >> t; while (t--) { string s; cin >> s; if (tolower(s[0]) == 'y' && ...
ALGO
0.997508
4.048502
373a6d1a-4722-494b-9738-68060bcb608d
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_431_28.cpp
#include <bits/stdc++.h> #pragma gcc optimize(O3) using namespace std; const long long INF = (long long)(1e18); const long long inf = 1e9 + 7; long double eps = 1e-10; long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; } long long lcm(long long a, long long b) { return a * b / gcd(a, b); } long lon...
ALGO
0.999683
5.148798
2108f6ba-f857-4c85-b4ac-84088a1cb8e3
tutuneko/c-
2025-1-21/指针和函数.cpp
#include<iostream> using namespace std; void swap2(int a, int b) { int temp; temp = a; a = b; b = temp; } void swap(int* a, int* b) { int temp; temp = *a; *a = *b; *b = temp; } int main() { int a = 11; int b = 79; swap(a, b);//ֵݣ cout <<"ֵݣ\t" << a <<"\t" << b << endl; swap(&a, &b);//ַ cout << "ַݣ\t" <...
ALGO
0.97478
3.790262
6bd06083-a22b-4463-b28b-59de5cf2df0f
VasisthaPrakhar/LC_Questions
0344-reverse-string/0344-reverse-string.cpp
class Solution { public: void reverseString(vector<char>& s) { int n=s.size(); int i=0,j=n-1; while(i<=j){ swap(s[i++],s[j--]); } } };
ALGO
0.999571
6.21028
feffbd7d-d63a-4259-a31d-801112a072ff
MonitorIizard/sophomore
section1/data-structure/[05]hash_table/hashLab/closeH_quadratic_FS1.cpp
#include <iostream> #include <sstream> #include <cstring> // for strlen #include <string> #include <unordered_map> using namespace std; #define ARRAYSIZE 20 #define STUDENT_ID_SIZE 14 unsigned long hashFunction(const string& key) { string trimmedKey = key.substr(1); // Remove the first character (command) in...
ALGO
0.997468
5.946411
15159f60-5ba5-4b4c-965a-4d3ed48b898e
flshbc/CFDeck
DifferentialErrorTest/differential_ftest.cpp
/* [Flashbac09] // 2023/03/19 differential_ftest // This program will export txt files into folder "test_float" as it runs. // Sorry to mention that the program isn't responsible for creating the folder if it does not exist. */ #include <iostream> #include <fstream> #include <iomanip> #include <stdlib.h> #include <str...
DATA
0.925077
3.889094
72081a29-2504-4839-8fbe-854ff6a46bf5
jjzhang166/ServiceGalaxy
dbc/src/inode_rbtree.cpp
#include "dbc_internal.h" namespace ai { namespace sg { inode_rbtree& inode_rbtree::instance(dbct_ctx *DBCT) { return *reinterpret_cast<inode_rbtree *>(DBCT->_DBCT_mgr_array[DBC_INODE_TREE_MANAGER]); } long inode_rbtree::insert(const dbc_inode_t& inode, long& root_offset, COMP_FUNC compare, dbc_upgradable_mutex_t& ...
TOOL
0.948553
5.126026
c1358f88-6dd7-49aa-bcaf-dbaafdd024ba
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_4253_2.cpp
#include <bits/stdc++.h> using namespace std; int main(void){ cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int left = 0; int right = s.size()-1; int ans = 0; while(left<right){ if(s[left]==s[right]){ left++; right--; }else if(s[left]=='x'){ left++; ans++; }else if(s[right]=='...
ALGO
0.999919
4.001777
a3677759-0078-4720-a94e-3959a28de184
purvathnere/DSA-Preparation
Unique Number of Occurrence.cpp
bool isFrequencyUnique(int n, int arr[]) { unordered_map<int,int> mp; for(int i=0;i<n;i++){ mp[arr[i]]++; } set<int> freq; for(auto it:mp) freq.insert(it.second); return mp.size()==freq.size(); }
ALGO
0.999649
5.25055
c2602347-00fc-4525-a113-5541ab66cb4a
Aashish-Rupareliya/C-OOPS
assignment/MODULE 4/MODULE 4.2/simple calsy/oprator overloading/oprator overloading/main.cpp
// // main.cpp // oprator overloading // // Created by apple on 21/05/23. // #include <iostream> using namespace std; class Matrix { private: int size; int* data; public: Matrix(int n) { size = n; data = new int[size]; } ~Matrix() { delete[] data; } void input...
ALGO
0.931313
4.835861
09c60754-60a0-474e-a017-419b78831c6d
artrivas/Chichovelo
arithm.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef pair<ll,ll> pl; #define all(x) (x).begin(), (x).end() #define pb push_back #define fi first #define se second const ll mod = 1e9+7; const ll inf = 1e18+10; const int N = 1000000; vector<int> primes; bool is_composit...
ALGO
0.999624
4.111524
8bc0f23c-2414-45c1-bf1a-61ba40dc9084
darwin/boost
libs/numeric/ublas/doc/samples/matrix_row_project.cpp
#include <boost/numeric/ublas/matrix.hpp> #include <boost/numeric/ublas/matrix_proxy.hpp> #include <boost/numeric/ublas/io.hpp> int main () { using namespace boost::numeric::ublas; matrix<double> m (3, 3); for (unsigned i = 0; i < m.size1 (); ++ i) { for (unsigned j = 0; j < m.size2 (); ++ j) ...
ALGO
0.982566
3.210712
2b849c94-b712-4ecc-b1a7-b68482670c10
unagi11/AlgorithmTest_Practice
leet code/125_isPalindrome/main.cpp
#include <iostream> using namespace std; class Solution { public: bool isPalindrome(string s) { string temp = ""; for (string::iterator it = s.begin(); it < s.end(); it++) { *it = tolower(*it); if ((*it >= 'a' && *it <= 'z') || (*it >= '0' && *it <= '9')) ...
ALGO
0.989315
5.46399
70f985d1-a419-49b9-bb54-86600fc7565b
joker5743/leetcode_practice-Cplus
AddOneRow.cpp
// 623. 在二叉树中增加一行 #include <vector> #include "data_structure.h" class AddOneRow { public: TreeNode *addOneRow(TreeNode *root, int val, int depth) { if (depth == 1) return new TreeNode(val, root, nullptr); std::vector<TreeNode *> curLevel(1, root); for (int i = 1; i < depth - 1; i++) { std::vect...
ALGO
0.999852
6.389977
6864330a-7c21-4188-b6e6-5baf241deaaf
Harsh-91221/CODEFORCES
FoxAndSnake.cpp
// Input // 9 9 // Output // ######### // ........# // ######### // #........ // ######### // ........# // ######### // #........ // ######### /*Explanation-> Fox Ciel starts to learn programming. The first task is drawing a fox! However, that turns out to be too hard for a beginner, so she decides to draw a snake in...
ALGO
0.999938
4.234412
8e881d58-b524-4dab-b21f-6835b020270e
Ri-Nai/CompetitionCode
ACM/2023-2024-1/BITNEW/2/B.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define End(X) return cout<<X<<'\n',void() priority_queue<int,vector<int>,greater<int> >Q; namespace T { const int M=2506; int n,k; int A[M],B[M]; void solve() { cin>>n>>k; for(int i=1;i<=n;++i) cin>>A[i],...
ALGO
0.999938
3.570021
27730885-a30b-4ec8-bb50-2db59f032e87
kofinandi/Algolab-2024
Week 13/Asterix and the Chariot Race/src/main.cpp
#include <iostream> #include <vector> #include <tuple> #include <limits> #include <algorithm> std::vector<std::vector<int>> races; std::vector<int> costs; std::tuple<int, int, int> rec(int u) { if (races[u].size() == 0) { return {costs[u], -1, 0}; } int min12 = 0; int min13 = 0; int min_diff = std::n...
ALGO
0.999387
4.720761
793ee442-71de-4a8f-8b08-7b063da6ce12
txgcwm/code_study
cplusplus/boost/boost_1_63_0/libs/asio/example/cpp03/invocation/prioritised_handlers.cpp
#include <boost/asio.hpp> #include <boost/function.hpp> #include <iostream> #include <queue> using boost::asio::ip::tcp; class handler_priority_queue { public: void add(int priority, boost::function<void()> function) { handlers_.push(queued_handler(priority, function)); } void execute_all() { while...
TOOL
0.863285
7.69276
4161aac1-eb93-4eab-b036-2f46c57e3d88
Kawser-nerd/CLCDSA
Source Codes/AtCoder/abc120/A/4485452.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; cout << min(b / a, c) << endl; return 0; }
ALGO
0.999827
4.135711
a7beef9f-fa06-466c-926d-79fb547c9a3c
shifat97/phitron
Codeforces/800/1030A.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n], flag = 0; for (int i = 0; i < n; i++) { cin >> a[i]; if (a[i] == 1) { flag = 1; break; } } if (flag == 1) cout << "HARD" << endl; else cout << "EASY" << endl;...
ALGO
0.999194
3.593466
4384cab9-fcf1-4ae2-aa16-ff5f1552c9f6
Deepak-192004/OBJECT-ORIENTED-PROGRAMMING-WITH-CPP
positive or negative numbers.cpp
#include <iostream> using namespace std; int main() { int num; cout<<"Enter the Integer: "; cin>> num; if(num > 0) { cout<< num <<" is Positive number"; } else if(num < 0){ cout<< num <<" is Negative number"; } else{ cout<< num <<" is Zero"; } return 0; }
ALGO
0.990084
3.441278
b62f58de-5f85-4449-8531-3bc3458c9ced
sangyong-99/algorithm_study
algorithm_study/programmers/Level_2/더 맵게.cpp
// // 더 맵게.cpp // algorithm_study // // Created by Shin Sangyong on 9/23/24. // #include <bits/stdc++.h> using namespace std; int solution(vector<int> scoville, int K) { int answer = 0; priority_queue<int, vector<int>, greater<int>> pq; for(int i: scoville) { pq.push(i); } ...
ALGO
0.999806
5.486241
98f8f364-a28a-4419-986a-69242883157c
QuangTran304/Cpp-challenge
35-Exercise3.36/main.cpp
/* * Author: Quang Tran * Date: July 11, 2019 */ #include <iostream> #include <vector> using std::begin; using std::end; using std::cout; using std::endl; using std::vector; bool compare(int (&array1)[3], int (&array2)[3]) { int* begin1 = begin(array1); int* end1 = end(array1); int* begin2 ...
TEST
0.974674
4.598767
f13e05b3-bc50-4fd2-bd7f-4f80259ce14b
thryndir/CPP
cpp09/ex02/src/main.cpp
#include <iostream> #include <ctime> #include <iomanip> #include "PmergeMe.hpp" int main(int argc, char **argv) { if (argc < 2) { std::cerr << "error: usage: ./PmergeMe 0 1 2 33 ...\n"; return (1); } std::string input; for (int i = 1; argv[i]; i++) { if (i > 1) input += " "; input += ...
ALGO
0.988955
5.471826
b361c157-cd93-47a7-964a-33ed6444444d
Felipe-Tagawa/C02
Funções/FUN - Passagem de parâmetros por referência 1.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; void media(int x, int y, float &m){ m = sqrt(x*y); } int main(){ int x, y; float m; cout << fixed << setprecision(2); cin >> x >> y; media(x,y,m); cout << "Media: " << m << endl; return 0...
ALGO
0.99978
4.40743
b4b0626c-3a9a-4dd2-9569-999b32826b8e
ZJaffee/Image23D
app/libs/opencv-3.0.0/samples/cpp/em.cpp
#include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/ml.hpp" using namespace cv; using namespace cv::ml; int main( int /*argc*/, char** /*argv*/ ) { const int N = 4; const int N1 = (int)sqrt((double)N); const Scalar colors[] = { Scalar(0,0,255), Scalar(0,255,0), ...
ALGO
0.998912
6.314088
80713f3f-1439-4def-b735-36e99e19742e
Purvesh271/CPP
digits of a number.cpp
#include <iostream> using namespace std; int main (){ int n,r; cout<<"Enter the digit: "; cin>>n; while (n>0) { r= n%10; n=n/10; cout<<r<<endl; } return 0; }
ALGO
0.999588
3.998865
9cee0caf-29c1-4209-9f3d-101c5ded187b
ADHLilly/graphviz
graphviz-7.1.0/lib/mingle/ink.cpp
#include <algorithm> #include <cmath> #include <cstdlib> #include <common/types.h> #include <common/globals.h> #include <sparse/general.h> #include <mingle/ink.h> #include <vector> double ink_count; static point_t addPoint (point_t a, point_t b) { a.x += b.x; a.y += b.y; return a; } static point_t subPoint (po...
ALGO
0.999219
5.646276
b3f36db7-80ba-4ffe-92f7-2bd627c3a0a7
sayymeoww/coding
OPT/tasks (demian)/block 1/day 5/homework/task 1.cpp
/* Перед вами квадратная матрица ячеек. В каждой ячейке находится одно целое число. Одинаковых чисел в матрице нет. Вам надо разделить матрицу на непересекающиеся цепочки. Цепочкой называется такая последовательность различных ячеек, в которой две соседние ячейки имеют общую сторону и числа в этой пос...
ALGO
0.999973
4.159565
bcd20039-a274-413d-bc35-3bffd7383ccb
AnmolSaini28/Gfg
Difficulty: Medium/Capacity To Ship Packages Within D Days/capacity-to-ship-packages-within-d-days.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { private: bool calculateDays(int weights[], int n, int days, int mid){ int count = 1; int cap = 0; for(int i=0 ; i<n ; i++){ if(cap +...
ALGO
0.999967
6.159894
8c74d911-fcd0-4d4a-bb1b-8ac30f9f0fb0
Yunlong323/Sophomore_codes
c语言/多位整数加法.cpp
#include <stdio.h> #define N 20 #include <stdlib.h> #include <string.h> int main() { int A1[N]; int A2[N]; char n1[N]; char n2[N]; //19+19,õ20λ memset(n1,'\0',sizeof(n1)); memset(n2,'\0',sizeof(n2)); memset(A1,0,sizeof(A1)); memset(A2,0,sizeof(A2)); //ֱʼ 0Ϊ˱ڽ while(scanf("%s %s",n1,n2)!=EOF) { int len...
ALGO
0.999917
3.14362
5cb2c949-5c68-4c6f-a4ee-881258088d4e
ruanpato/maratona
uriOnlineJudge/cpp/1020.cpp
#include <iostream> //Age in days using namespace std; int main(){ int days; cin >> days; cout << days/365 << " ano(s)\n" << (days%365)/30 << " mes(es)\n" << (days%365)%30 << " dia(s)" << endl; return 0; }
ALGO
0.992548
3.831467
3bca059f-181c-45b1-9ca6-9c251e32066d
shubhco07/DAA
Lab Assignment/Week 03/q2.cpp
#include<iostream> using namespace std; void swap(int *x, int *y) { int temp = *x; *x = *y; *y = temp; } void Selection_sort(int arr[],int n) { int comp=0,swaps=0; int i,j,pos=0,min=0; for (i=0;i<n-1;i++) { min=arr[i]; pos=i; for (j=i+1;j<n;j++) { ...
ALGO
0.999786
4.266989