uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
50c34923-e29d-47a8-a357-01e5b4b6eebe
lufiDK4674/C-C-Programs
CD_FirstFollow.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_PRODUCTIONS 100 #define MAX_PRODUCTION_LENGTH 10 typedef struct { char lhs; char rhs[MAX_PRODUCTION_LENGTH]; } Production; Production grammar[MAX_PRODUCTIONS]; int num_productions = 0; void findFirstpos(char symbol, int *firstpos, int *i...
ALGO
0.999972
4.323047
481a3cb8-36ed-407d-8f52-1a517de50b50
AmHackish/codeforces-answers
1270B.cpp
#include <bits/stdc++.h> using namespace std; #define lli long long int int main() { int t; cin >> t; while(t--) { int n; cin >> n; vector<lli> a(n); for(int i=0;i<n;i++) cin >> a[i]; int index = 0; bool ans = false; for(int i=0;i<n-1;i++) { if(abs(a[i]-a[i+1])>=2) { ans = true; ...
ALGO
0.99991
3.460479
d9811208-fb01-48cf-8bce-3345602b9a05
LLEElove/learngit
paixvfangfa/未命名1.cpp
#include<stdio.h> int main() { int a[5],i,j,min,t; for(i=0;i<=4;i++) { scanf("%d",&a[i]); } for(i=0;i<=4;i++) { min=i; for(j=i;j<=4;j++) { if(a[j]<a[min]) { min=j; } } t=a[i]; a[i]=a[min]; a[min]=t; } for(i=0;i<=4;i++) { printf("%d ",a[i]); } return 0; }
ALGO
0.999995
3.165402
c0d2cce0-0ee9-43d7-80c4-35d86160c172
anuj2001310/Leetcode-
0153-find-minimum-in-rotated-sorted-array/0153-find-minimum-in-rotated-sorted-array.cpp
class Solution { public: int findMin(vector<int>& nums) { int left = 0; int right = nums.size() - 1; while (left < right) { int mid = left + (right - left) / 2; if (nums[mid] > nums[right]) left = mid + 1; else right = mid;...
ALGO
0.999982
6.031422
29a76d88-55a3-459c-9b8e-78d48b4169df
Sahil-Badkul/leetcode
60-permutation-sequence/60-permutation-sequence.cpp
class Solution { public: string getPermutation(int n, int k){ vector<int> nums; int fact = 1; for(int i = 1; i < n; i++){ fact *= i; nums.push_back(i); } nums.push_back(n); // We are considaring 0 based indexing. k--; string ans...
ALGO
0.999985
6.316246
2e34ed8a-8a2e-47d0-9859-1eb796f5d84b
leggedrobotics/rsl_panoptic_mapping
dynamic_mapping/thirdparty/eigen/doc/examples/Tutorial_BlockOperations_corner.cpp
#include <Eigen/Dense> #include <iostream> using namespace std; int main() { Eigen::Matrix4f m; m << 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12, 13,14,15,16; cout << "m.leftCols(2) =" << endl << m.leftCols(2) << endl << endl; cout << "m.bottomRows<2>() =" << endl << m.bottomRows<2>() << endl << ...
ALGO
0.999193
4.092313
5c1cb9a5-ee89-4797-8d2e-cfebee431633
pptale/2025-01-CP
test-19-20001.cpp
#include <bits/stdc++.h> using namespace std; int findMaxEle(vector<int> a) { // function to find maximum element in a vector if (a.empty()) return 1; //at least a LIS of length 1 will exist in all cases int maximum = a[0]; for (int i = 0; i < a.size(); ++i) if (a[i] > maximum) maximum = a[i]; return maxim...
ALGO
0.99844
4.143949
0e880c1c-c533-4cd3-8e0a-4106c67dbeb6
seo-wo/BOJ
BRONZE🥉/10950.cpp
#include <iostream> int main(void) { int T,a,b = 0; std::cin >> T; for(int i = 0; i < T; ++i) { std::cin >> a >> b; std::cout << a+b << '\n'; } return (0); }
ALGO
0.998717
5.189879
3cd1414f-2021-4c44-8af7-7c79b37b715d
Hijiongfeng/Likou
142.cpp
#include<iostream> #include<vector> using namespace std; struct ListNode{ int val; ListNode* next; ListNode(int num,ListNode* next1 = nullptr){ val = num; next = next1; } }; //打印链表 void printNode(ListNode* head){ while(head!=nullptr){ cout<<head->val<<" "; head = he...
ALGO
0.999968
4.859756
36a62b87-b171-479b-958e-9ed1b7582c76
SBidaibek/acm
cf/vk3/b.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 F first #define S second #define pb push_back typedef long long ll; typedef pair <int, int> pii; typedef long double ld; typedef vector <ll> ...
ALGO
0.999943
3.52964
32b2a0c5-4a04-493b-a02d-e30edb4564c0
koi151/Numer-theory
(25) So Thuan Nghic Co 3 Uoc Nguyen To.cpp
// Một số được coi là đẹp nếu nó là số thuận nghịch và có ít nhất 3 ước số nguyên tố khác nhau. Viết chương trình in ra các số đẹp như vậy trong một đoạn giữa hai số nguyên cho trước // Input Format // 2 số a, b // Constraints // 1≤a≤b≤10^7 // Output Format // In ra các số đẹp trong đoạn a, b. Trong trường hợp kh...
ALGO
0.999715
4.686976
666e7ece-d4d0-4de1-ad96-209ef73ca0aa
trilinos/Trilinos
packages/ml/test/MultiLevelPreconditioner_Sym/MultiLevelPreconditioner_Sym.cpp
#ifndef HAVE_CONFIG_H #define HAVE_CONFIG_H #endif #ifdef __APPLE__ #include <stdlib.h> // C++ standard does not include malloc.h, and Apple platforms don't support this. #else #include <malloc.h> // icc (at least) does not define mallinfo() from stdlib.h. #endif #include <cstdio> #include "ml_config.h" #if defined(HA...
TOOL
0.895658
5.870506
b666b172-b9f7-4518-99e4-a72e3f27bd48
m4oughi/100DaysofCode
pureCPP/0037. Day 37/Standard Template Library Basics/011. Sequence Containers - Deque/012. Removing Specific Elements Using remove_if/main.cpp
#include <iostream> #include <deque> #include <algorithm> bool isOdd(int n) { return n % 2 != 0; } int main() { std::deque<int> numbers = {1, 2, 3, 4, 5, 6}; auto newEnd = std::remove_if(numbers.begin(), numbers.end(), isOdd); numbers.erase(newEnd, numbers.end()); // Erase the removed elements f...
ALGO
0.999516
6.318041
c4511dd3-2d3b-4b70-93f3-8e7fd58fb06f
Kartavya-Shrivastav/LeetCode-Uploads
3_Longest_Substring_Without_Repeating_Characters.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: int lengthOfLongestSubstring(string s) { unordered_set<char> charSet; int start = 0; int maxLength = 0; for (int end = 0; end < s.size(); ++end) { while (charSet.count(s[end])) { charS...
ALGO
0.999584
6.073786
dcb6cf56-9234-4f0a-9b23-3ce223b6ff51
AndrejGockov/Object-Oriented-Programming-FINKI
Exercises for First Partial Exam/7.cpp
/* Во програмскиот јазик С++ да се креира структура Vozenje за опишување на адреналински возења во забавен парк. Структурата треба да содржи: (5 поени) Име на возењето ( низа од 100 знаци) Времетраење во минути (цел број) Цена (децимален број) Дали има студентски попуст (1-да, 0-не) Да се креира структура ZabavenPark,...
ALGO
0.988986
4.858349
0a70b4fc-1a6a-450d-8848-d7431f4dac85
Sakshi-2100/Crack-Your-Placement
SubarraySumsDivisiblebyK.cpp
/* Given an integer array nums and an integer k, return the number of non-empty subarrays that have a sum divisible by k. A subarray is a contiguous part of an array. Example 1: Input: nums = [4,5,0,-2,-3,1], k = 5 Output: 7 Explanation: There are 7 subarrays with a sum divisible by k = 5: [4, 5, 0, -2, -3, 1], [5],...
ALGO
0.999913
6.373613
d9a20430-cd62-41d6-b1a6-d394acf5a2e0
AditiMishra2003/leetcode_practice_questions
0096-unique-binary-search-trees/0096-unique-binary-search-trees.cpp
class Solution { public: int catalan_num(int n){ int cat[n+1]; cat[0]=cat[1]=1; for(int i=2;i<=n;i++){ cat[i]=0; for(int j=0;j<i;j++){ cat[i]+=cat[j]*cat[i-j-1]; } } return cat[n]; } int numTrees(int n) { return...
ALGO
0.999972
6.235866
d71005b3-b72b-400e-870d-46efd81a8997
Manishak798/DSA-Cpp
Matrix/matrixtranspose.cpp
/** * @file matrixtranspose.cpp * @author your name (<EMAIL>) * @brief * @version 0.1 * @date 2024-03-12 * * @copyright Copyright (c) 2024 * Write a program in C to find the transpose of a given matrix. Test Data : Input the rows and columns of the matrix : 2 2 Input elements in the first matrix : element - [0...
ALGO
0.999628
5.911476
541fb784-204d-4ad0-8f50-3f82bb60b3d1
andreapassini/LearningCpp
CppGoogle1/CppGoogle4/CppGoogle4.cpp
#include <iostream> constexpr auto max_size = std::numeric_limits<std::streamsize>::max(); int GenerateAnInt(int upperLimit, int loweLimit) { return rand() % upperLimit + loweLimit; } int main(int argc, char* argv[]) { std::cout << "Welcome to the guessing game" << std::endl; std::cout << std::endl << "-...
TOOL
0.922582
4.087708
e0a49f19-a300-4305-a032-bc541c6c51af
ishandutta2007/codeforces
omer223/normal/762/C.cpp
#define fast ios::sync_with_stdio(false); cin.tie(0) #define foru(i, k, n) for (int i = k; i < n; i++) #define ford(i, k, n) for (int i = k; i >= n; i--) #define pb push_back #define mp make_pair #include <iostream> #include <vector> #include <algorithm> #include <string> #include <list> using namespace std; typedef ...
ALGO
0.999986
3.460122
f9c5e5f5-2d85-47d5-b6fb-4700db82a430
marcouellet/STM32F407VG_ADC_DAC_BTC_CPP
Core/Src/dsp_biquad.cpp
/* * dsp_biquad.cpp */ #include <biquad.hpp> #include <arm_math.h> #include <tone_control.h> #include <dsp_util.h> #include <dsp_token.h> tone_intensity_level bass_biquad_intensity_level = NONE; tone_intensity_level treble_biquad_intensity_level = NONE; Biquad* bass_biquad_left = NULL; Biquad* bass_biquad_right = ...
ALGO
0.945255
5.093172
6c229b40-b588-47c3-82a4-cdba5c0adf24
Fadis/dlambda
src/compile/less_equal.cpp
#include <boost/mpl/and.hpp> #include <boost/mpl/or.hpp> #include <boost/mpl/not.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/utility/enable_if.hpp> #include <boost/range/algorithm/copy.hpp> #include <llvm/IR/Value.h> #include <llvm/IR/IRBuilder.h> #include <dlambda/type.hpp> #include <dlambda/proto/n...
TOOL
0.924106
7.857151
3557125d-d3bb-4731-91c2-487d9a32c7eb
RinCloud/TrickCatcher
Datasets/TrickyBugs/GenProgs/dpp_generated_progs_cpp/p03127/p03127_num5_parsed.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int N; cin >> N; vector<int> health(N); for(int i = 0; i < N; i++) cin >> health[i]; sort(health.begin(), health.end()); int min_final_health = health[0]; for(int i = 1; i < N; i++) {...
ALGO
0.999913
4.283689
c77a79a8-9fb3-467f-9ad5-3d1d1a0d879c
hifziiii/Quote_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.998733
6.76775
7bc0a488-13c6-49c1-be0b-bb54e689e886
it-dieuanh/CompetitiveProgramming_bydieuanh
dpcay_tomau.cpp
#include <bits/stdc++.h> using namespace std; #define int long long const int MN = 1e5 + 5; int n, u, v, dp[MN][3]; vector<int> adj[MN]; void dfs(int u, int par) { for (auto v : adj[u]) { if (v != par) { dfs(v, u); dp[u][1] += dp[v][0]; dp[u][0] += max(dp[v][1], dp[v][0]); } } } signed main() { ios...
ALGO
0.998274
4.524896
67a5cba0-ad2e-4628-a010-fa1b5b4be5e1
tgc333/Algo
Algorithm/11053.cpp
#include<iostream> #include<algorithm> using namespace std; int dp[1001][2] = { 0 }; int main() { int n; cin >> n; int count = 0; int maxi = 1; for (int i = 0; i < n; i++) { cin >> dp[i][0]; dp[i][1] = 1; } for (int i = 1; i < n; i++) { for (int j = 0; j < i; j++) { if (dp[i][0] > dp[j][0]) { dp[i...
ALGO
0.999959
3.611406
14a46349-1381-4816-a6e8-e6b19ab5ca98
ravikiranmara/ProgrammingChallenges
hackerrank/problemSolving/breakingTheRecords.cpp
#include <bits/stdc++.h> using namespace std; vector<string> split_string(string); // Complete the breakingRecords function below. vector<int> breakingRecords(vector<int> scores) { int min, max; vector<int> ret; min = max = scores[0]; ret.resize(2, 0); for (int i=1; i<scores.size(); i++) { ...
ALGO
0.999735
4.686563
42f2ba69-cb9f-4beb-8394-c2cec7fd649f
alexandraback/datacollection
solutions_5686275109552128_0/C++/Diego1149/Source.cpp
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <queue> #include <map> #include <numeric> #include <set> #include <sstream> #include <stack> #include <utility> #include <vector> #define INF 1000000000 #define ...
ALGO
0.999815
3.830473
b53b24f5-de9d-427f-b530-f94e1672cc63
keijak/comp-pub
cf/contest/1598/B/main_B.cpp
#include <bits/stdc++.h> #define REP_(i, a_, b_, a, b, ...) for (int i = (a), END_##i = (b); i < END_##i; ++i) #define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__) #define ALL(x) std::begin(x), std::end(x) using Int = long long; using Uint = unsigned long long; using Real = long double; template<type...
ALGO
0.999683
5.53197
a615f4d1-e7c0-4cb1-b1bf-893c9dc0da0a
hamzak11111/Multithreading-and-CPU-Affinity-Performance-Analysis-in-High-Performance-Computing
code/Q2v1.cpp
#include<iostream> #include<unistd.h> // fork() + exec() + dup() + sleep() #include<pthread.h> // pthread #include<string.h> // string #include <cmath> #include <semaphore.h> #include <sys/time.h> #include <time.h> #include <stdio.h> #include<fstream> using std::ofstream; using namespace std; int **arr=new int*[16]; i...
TOOL
0.968799
3.167232
6e9c5465-55ef-4e13-8b40-fafe1c30ddc6
MattiaLandi/progetto-1
lista concatenata.cpp
#include <iostream> using namespace std; #define N 10 int main() { struct nodo{ int valore; nodo *prossimo; nodo(int _valore, nodo* _prossimo) { valore = _valore; prossimo = _prossimo; } }; nodo *testa = new nodo(0, NULL); nodo *curre...
ALGO
0.998967
3.648986
720b58ad-4dc4-4d87-ab82-3c9d42d3bbc2
weimeittx/wax-blockchain-bin
src/boost_1_71_0/libs/fiber/src/numa/solaris/topology.cpp
#include "boost/fiber/numa/topology.hpp" extern "C" { #include <errno.h> #include <sys/lgrp_user.h> } #include <system_error> #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif namespace { void explore( std::vector< boost::fibers::numa::node > & topo, lgrp_cookie_t cookie, lgrp_id_t node) { int siz...
TOOL
0.978301
6.481606
fa01763a-df97-495f-a35f-1ac4138d9118
lbv/pc-code
solved/o-q/phone-list/uva/phone.cpp
#include <cstdio> #include <cstring> #define ALPHABET 10 #define WORDS 10000 #define WORDLEN 10 #define Zero(v) memset(v, 0, sizeof(v)) #define NonZero(v) (memcmp(v, _zero, sizeof(_zero)) != 0) static const int _zero[ALPHABET] = {0}; struct Trie { struct Node { int children[ALPHABET]; bool end; }; int n...
ALGO
0.999586
5.013281
3f955a81-cb2a-460a-b356-02d12643a5fd
STRUKTUR-DATA-SE-07-02/Modul-8
2211104038_AdhiansyahMuhammadPradanaFarawowan/UNGUIDED/unguided_1.cpp
// Diadaptasi ulang dari kode-kode GUIDED #include <iostream> class Node { public: int data; Node *next; Node(int value) { data = value; next = nullptr; } }; class Queue { private: Node *front; Node *rear; public: Queue() { front = nullptr; rear = ...
ALGO
0.989426
5.104257
df91689e-737f-4d60-8422-2800617cd577
sqz0914/c-primer-plus-answers
Chapter 3/weight.cpp
#include<stdio.h> int main(void) { float weight; float value; printf("Are you worth your weight in rhodium?\n"); printf("Let's check it out.\n"); printf("Please enter your weight in pounds: "); scanf("%f",&weight); getchar(); value = 770.0*weight*14.5833; printf("Your weight in rhodium is worth $%.2f.\n",value...
ALGO
0.92483
4.251957
aae99ea2-3d25-4d48-8fbf-add402e39d4b
AlexSias18/Asignacion14
Source3.cpp
#include <conio.h> #include <stdio.h> #include <iostream> using namespace std; int main() { int x = 1; int b = 1; int n, a; int suma = 0; cout << "Ingrese el valor de n:" << endl; cin >> n; cout << "Ingrese el valor de a:" << endl; cin >> a; if (n < 0 || a < 0) { cout << "ERROR INGRESE OTRO VALOR" << en...
ALGO
0.998948
3.140769
73cdd6ec-3084-4461-a5a3-c919841cec32
Harsh1tSh/DSA-C-
Random/55.cpp
#include<iostream> using namespace std; int main(){ int x = 10; float p = 5.5; cout << &x << endl; cout << &p << endl; int *xptr = &x; cout << xptr << endl; // address to the pointer varibale cout << &xptr << endl; //pointer to a pointer int ** xptre = &xptr; //dereference...
TOOL
0.907548
3.388155
2252dd5f-1fdb-49d8-b682-026dd232c3a3
ishandutta2007/codeforces
ekzhang/normal/735/D.cpp
#include <bits/stdc++.h> using namespace std; int N; bool is_prime(int k) { if (k == 1) return false; for (int x = 2; x < sqrt(k) + .01; x++) { if (k % x == 0) { return false; } } return true; } int solve(int n) { if (is_prime(n)) { return 1; } if (n % 2 == 0) { return 2; } if (is_prime(n-2)) { ...
ALGO
0.999945
4.909402
3ef1e52a-c314-471b-ab36-f161ec375fd1
alexandraback/datacollection
solutions_5738606668808192_1/C++/ffao/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define REP(i,n) for(int(i)=0;(i)<(int)(n);(i)++) int n, j; int odds[32]; int evens[32]; void read() { scanf("%d %d", &n, &j); } void solve() { printf("\n"); int its = 0; int rem = (n-1)/2; for (int i = rem/2;...
ALGO
0.999948
3.39841
baf7da66-68b9-4964-a0c3-e9aecac98031
Project-Mushroom/platform_frameworks_av
media/codecs/amrwb/dec/src/dec_acelp_2p_in_64.cpp
/* ------------------------------------------------------------------------------ Filename: dec_acelp_2p_in_64.cpp Date: 05/08/2007 ------------------------------------------------------------------------------ REVISION HISTORY Description: ------------------------------------------------------------------...
ALGO
0.999688
5.908487
98e8fb38-cbb1-4961-8b78-cf1f0ca72b13
JaaKos/calculator
source/calculator.cpp
#include "calculator.hpp" calculator::calculator(std::vector <std::string> input) : tokens(input) { establishValue(); } void calculator::establishValue() { while (scanForBrackets()) tokens = handleBrackets(tokens); while (scanForOperations()) { tokens = getResultsPowers(tokens); tokens...
TOOL
0.992457
4.641729
010bbc00-190b-420f-b142-4e6e748e1caa
1s22s1/kanraniwa
20250123/joi2020_yo1a_a.cpp
#include <bits/stdc++.h> using namespace std; int main() { int A, B, C; cin >> A >> B >> C; int one = 0; int two = 0; if (A == 1) { one++; } else { two++; } if (B == 1) { one++; } else { two++; } if (C == 1) {...
ALGO
0.999943
4.324494
d33e0646-e4cb-4e5d-9b4b-540a765faa83
aniketgupta17/Image-processing-
opencv-python-4.5.3.56/opencv/samples/cpp/fitellipse.cpp
/******************************************************************************** * * * This program is demonstration for ellipse fitting. Program finds * contours and approximate it by ellipses using three methods. * 1: OpenCV's original method fitEllipse which implements Fitzgibbon 1995 method. * 2: The App...
ALGO
0.997993
6.216884
7d0a88df-6358-42ce-8a16-ea7c97def99c
ridhij93/LLM-Conc-RMM
code-litmus-atomic-clean/RWC.cpp
#include <thread> #include <iostream> #include <pthread.h> #include <atomic> #include <assert.h> using namespace std; std::atomic<int> x; std::atomic<int> y; std::atomic<int> a; std::atomic<int> b; void *thread1(void *threadid) { atomic_store(&x, 1); } void *thread2(void *threadid) { int p, q; p = atomi...
ALGO
0.891461
3.783524
174147a4-8c29-4ba1-9b15-a9f3f84c2cd3
chucknology/boost-155
boost_1_55_0/libs/graph/example/grid_graph_example.cpp
#include <iostream> #include <boost/array.hpp> #include <boost/graph/grid_graph.hpp> #define DIMENSIONS 3 using namespace boost; typedef grid_graph<DIMENSIONS> Graph; typedef graph_traits<Graph> Traits; // Define a simple function to print vertices void print_vertex(Traits::vertex_descriptor vertex_to_print) { std...
ALGO
0.967787
6.852503
53ea6af4-aab9-4b7b-8e3f-424e943fad4d
Bhargav-CS/100DaysOfCode
2011_finalvalueofvariable.cpp
class Solution { public: int finalValueAfterOperations(vector<string>& o) { int ans=0; for(int i=0;i<o.size();i++){ if(o[i][1] == '+' && o[i][2]=='+'){ ans++; }else if(o[i][0] == '+' && o[i][1]=='+'){ ++ans; }else if(o[i][1] == '-' ...
ALGO
0.999984
5.681131
ba0d0105-548a-45d2-9bfb-1f8763bc2e3e
mmavrop/Cache-Fault-Tolerant-Gem5-Simulator
src/systemc/tests/systemc/misc/stars/star102574/star102574.cpp
/***************************************************************************** star102574.cpp -- Original Author: Preeti Panda, Synopsys, Inc., 2000-08-09 *****************************************************************************/ /***************************************************************************...
TOOL
0.962941
3.564352
29027869-cb1a-4d76-b311-7c8031c75b5f
zhangg0314/_Note
嵌入式开发笔记/01_编程语言/C++/00_cpp_new_features-main/cpp_11/003_std_atomic_std_uint16_t.cpp
#include <thread> #include <atomic> #include <iostream> #include <list> using namespace std; atomic_uint16_t uint16_tCount(0); void threadfun1() { for(int i =0; i< 1000; i++) { printf("uint16_tCount:%d\r\n", uint16_tCount); } } void threadfun2() { for(int i =0; i< 1000; i++) { ...
TOOL
0.912343
5.008411
9f8d3bed-885e-4644-9a29-14301d198ecc
kishan2k2/BMI-calculator-Flutter
BMI_calculator/flutter_application_1/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.997431
6.797273
018de574-dc91-4bc8-8b29-867fca4421a8
shadeel-han/ACM_Code
USACO/Chapter3/Section3-2/3-2-Factorials.cpp
/* ID: j9010311 PROG: fact4 LANG: C++ */ #include <cstdio> using namespace std; int main(){ freopen("fact4.in","r",stdin); freopen("fact4.out","w",stdout); int i, ans[4221]; ans[1] = 1; for( i=2; i<4221; ++i ){ ans[i] = ans[i-1]*i; while( !(ans[i]%10) ) ...
ALGO
0.998896
3.722618
98aa8e5c-9661-4501-980d-8d281bfc0e1a
tjdvyzl/algorithm_study
baekjoon/1522/1522.cpp
#include <iostream> using namespace std; string s; int a_size = 0; int b_size = 0; int ans = 987654321; int main() { cin >> s; for (auto e : s) { if (e == 'a') a_size++; else b_size++; } int a_cnt = 0; int b_cnt = 0; int x1 = 0, x2 = a_size - 1; for (int i = x1; i <= x2; i++) {...
ALGO
0.998553
3.693116
1aae45c6-3462-42ce-8736-dfcdf20e68b8
RainerGrimm/EmbeddedProgrammingWithModernCpp
unorderedOrderedContainerPerformance.cpp
#include <chrono> #include <iostream> #include <map> #include <random> #include <unordered_map> static const long long mapSize= 10000000; static const long long accSize= 1000000; int main(){ std::cout << '\n'; std::map<int, int> myMap; std::unordered_map<int, int> myHash; for ( long long i=0; i < mapSize; ...
TOOL
0.850364
5.240204
740e1474-920b-4447-b0b7-eda7d996b48a
SuTiao/GAMES101
Assignment6/Assignment6/Scene.cpp
// // Created by Göksu Güvendiren on 2019-05-14. // #include "Scene.hpp" void Scene::buildBVH() { printf(" - Generating BVH...\n\n"); this->bvh = new BVHAccel(objects, 1, BVHAccel::SplitMethod::NAIVE); } Intersection Scene::intersect(const Ray &ray) const { return this->bvh->Intersect(ray); } bool Scene...
ALGO
0.973922
5.5237
55904465-791c-4f41-83a0-e2f4ffb149ea
shivangi0110/24SS-AllTrans-main
benchmarks/benchmarks_source/8_level/p03001/s147922927.cpp
#include<iostream> #include <vector> #include <algorithm> #include <string> #include <cmath> #include <map> #include <bitset> #include <stack> #include <queue> #include <fstream> #include <functional> using namespace std; using ll = long long; #define all(x) (x).begin(),(x).end() #define PRI(n) cout << n << " "<<endl...
ALGO
0.999657
3.512067
c3cf4d17-77d1-4bd7-bf17-bcab9af4135e
yinquan529/platform-packages-apps-LegacyCamera
jni/feature_stab/db_vlvm/db_utilities_indexing.cpp
/* $Id: db_utilities_indexing.cpp,v 1.3 2011/06/17 14:03:31 mbansal Exp $ */ #include "db_utilities_indexing.h" #include "db_utilities.h" /***************************************************************** * Lean and mean begins here * **********************************************...
ALGO
0.997848
5.427917
804a2865-f157-41de-99e0-4ab3656591ed
mortie/llvm-axa-backend
llvm/lib/Transforms/IPO/GlobalDCE.cpp
#include "llvm/Transforms/IPO/GlobalDCE.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/TypeMetadataUtils.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Module.h" #include "llvm/IR/Operator.h" #include "llvm/InitializePasses.h" #inc...
TOOL
0.923816
7.849996
742f9d6e-f47c-483b-a47c-970823ef6ffe
lsj0822/Problem_Solving
C++/연습문제/19_이분탐색/0x13_[G4]3151.cpp
#include <bits/stdc++.h> using namespace std; int n, arr[10005]; long long ans = 0; int main() { cin >> n; for (int i = 0; i < n; i++) cin >> arr[i]; sort(&arr[0], &arr[n]); for (int i = 0; i < n-1; i++) { for (int j = i + 1; j < n; j++) { int tot = arr[i] + arr[j]; ans += upper_bound(&arr[j + 1], &arr[n],...
ALGO
0.999806
4.002623
94ede3be-d2ca-4db4-9267-20119e7b5b8f
tangentforks/XPokerEval
XPokerEval.Senzee7.Test/XPokerEval.Senzee7.Test.cpp
// XPokerEval.Senzee7.Test.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "..\XPokerEval.Senzee7\buildtable.h" #include "..\XPokerEval.Senzee7\index52c7.h" #include "..\XPokerEval.CactusKev.PerfectHash\poker.h" #include <iostream> int _tmain(int argc, _TCHAR* argv[]) { pri...
ALGO
0.949566
6.096106
4a6e7188-712c-4f2a-8f05-ca0710cb2c38
intel/cm-compiler
clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
#include "clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/Stmt.h" #include "clang/AST/StmtCXX.h" #include "clang/Analysis/AnalysisDeclContext.h" #include "clang/Analysis/CFG.h" #include "clang/Analysis/ProgramPoint.h" #include "clang/B...
ALGO
0.998495
7.834344
1d179667-89e6-496c-80bf-e2c597db0c99
ishandutta2007/codeforces
bicsi/normal/573/A.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> Pair; unordered_set<int> Set; int main() { #ifndef ONLINE_JUDGE freopen("debug.in", "r", stdin); #endif // ONLINE_JUDGE int n, a; cin>>n; for(int i=1; i<=n; i++) { cin>>a; while(a % 2 == 0) a /= 2; ...
ALGO
0.999961
4.125151
b78a367d-b50d-4985-a1c2-b954af0f8749
LemuriaX/luogu
对称迷宫.cpp
#include<bits/stdc++.h> using namespace std; string fz[20]; vector<string> s; int n; int xx[] = {0,1}; int yy[] = {1,0}; bool dc(string q){ string p; for(int i = q.length()-1;i>=0;i--){ p = p + q[i]; } if(p == q) return true; return false; } void dfs(int x,int y,string temp){ if(x == n-1&&y == n-1){ if(...
ALGO
0.999914
4.163892
2b5f7920-b6fc-48a4-ab03-d1b4d399df84
Abhishek222747/dsa
Recursion and Backtracking/Largest Number in K Swaps.cpp
Given a number k and string s of digits denoting a positive integer, build the largest number possible by performing swap operations on the digits of s at most k times. //{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { private: void match(string s,strin...
ALGO
0.999101
6.609866
666cca58-169e-4789-b0b1-545537a3d36a
ishandutta2007/codeforces
kotatsugame/normal/1270/A.cpp
#include<cstdio> using namespace std; int t; main() { scanf("%d",&t); for(;t--;) { int n,k1,k2;scanf("%d%d%d",&n,&k1,&k2); bool f1=false,f2=false; for(int i=0;i<k1;i++) { int a;scanf("%d",&a); if(a==n)f1=true; } for(int i=0;i<k2;i++) { int a;scanf("%d",&a); if(a==n)f2=true; } puts(f1?"Y...
ALGO
0.999395
3.20025
b33b901a-a12e-4f94-905f-e0b8d498f207
DungNguyenCoder/SPOJ_PTIT
P144PROD.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define faster() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define mx 1000000 #define mod 100000007 #define TEST 0 void solution() { int t = 1; while(1) { int n; cin >> n; if(n == 0) break;...
ALGO
0.99984
4.365435
7421201d-921d-4c74-b654-2ba61dd95cb0
kofny/TransPCFG
transfer_learning_guess.cpp
#include <unistd.h> #include <cstdlib> #include <cstdio> #include <cstring> #include <iostream> #include <iomanip> #include <fstream> #include <deque> #include <list> #include <queue> //using namespace std; #define MAXWORDSIZE 20 //Maximum size of a word from the input dictionaries #define MAXINPUTDIC 1 //Maximum nu...
TOOL
0.926185
4.837692
f32d274b-7d73-4236-a7a0-cdb52479126d
starlab-unist/pathfinder
src/exectree.cpp
#include "exectree.h" #include <iomanip> #include <sstream> #include "input_signature.h" #include "options.h" namespace pathfinder { const PCID Node::EpsilonPCID = 0; const ExecPath Node::EPSILON = ExecPath({Node::EpsilonPCID}); Node::Node(ExecTree* exectree_) : exectree(exectree_) {} const size_t Node::MAX_INPUT_...
ALGO
0.982344
5.001813
2d782d8f-9c56-48cb-8b61-e06b2c980c11
Jagdish9870/codeInCPP
operators/arithmatic.cpp
#include<iostream> using namespace std; main() { int a=20; int b=10; cout<<"arithmatic operator : "<< a+b<< " "<<a-b<<" "<< a*b<<" "<<a/b; }
ALGO
0.899974
3.001873
6e1bb539-ce18-40ba-bf1b-47bc493eab6d
abrhamkg/point2mesh
Manifold/3rd/igl/lbs_matrix.cpp
IGL_INLINE void igl::lbs_matrix( const Eigen::MatrixXd & V, const Eigen::MatrixXd & W, Eigen::MatrixXd & M) { using namespace Eigen; // Number of dimensions const int dim = V.cols(); // Number of model points const int n = V.rows(); // Number of skinning transformations/weights const int m = W.cols...
ALGO
0.994325
5.107077
a7d40bae-a96d-432d-85f3-0c613972508d
JMTGBS/cp2015440038
20181106/PA.cpp
#include <stdio.h> //printArray() //Է : 迭 // : //μȿ : ȭ鿡 迭 void printArray(int arr[], int len){ for(int index = 0; index<len; index++){ printf("array[%d] = %d \n ", index, arr[index]); } } int main(){ int a[3] = {10, 20, 30}; //迭 , 迭̸ : a, 迭 : 3 int* ptr; // 迭 ̸ ϸ 迭 ù Ͱ ȴ. ex) a or b or c etc... ptr = ...
TOOL
0.961796
3.205266
399dd675-b670-4c89-9c1f-9a1f20cc1b96
sumit18cs/InterviewBit_Solution
Greedy Algorithm/Disjoint Intervals.cpp
int Solution::solve(vector<vector<int> > &v1) { int ans=0,n=v1.size(),i,a; vector<pair<int,int> >v; for(i=0;i<n;i++){v.push_back({v1[i][1],v1[i][0]});} sort(v.begin(),v.end()); ans=1; a=v[0].first; for(i=1;i<n;i++){ if(v[i].second>a){ ans++; a=v[i].first; ...
ALGO
0.999953
4.991194
ae60d0eb-53c4-48f3-9cdd-0023444eff1e
alexandraback/datacollection
solutions_5765824346324992_0/C++/paco/b.cpp
#include<iostream> #include<vector> #include<cstdio> using namespace std; typedef unsigned long long ull; template <class T> T GCD(T a, T b) { T t; while(b != 0) {t = b;b = a % b;a = t;} return a; } template <class T> T LCM(T a, T b) { return (a*b)/GCD(a,b); } int main() { int nCases; cin>>nCases; for(in...
ALGO
0.999985
3.255315
a55b84ec-f06e-4391-86d8-401247c5df43
shackiru/C_Programming
Data Structure/Tutor/Session03/Hashing.cpp
#include <stdio.h> #include <string.h> int hashFunc(char value[]) { return value[0] - 'a'; } char hashTable[26][26]; void initTable() { for(int i = 0; i < 26; i++) { strcpy(hashTable[i], ""); } } void printTable() { for(int i = 0; i < 26; i++) { if(hashTable[i][0] != '\0') ...
ALGO
0.999929
4.084619
232d449c-65e5-4be6-a59e-c29d884f0c51
JustAG7/Competitive_Programming
ICPC/2023/ICPC Qualifier 2023/B.cpp
#include<bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL); #define ll long long #define pb push_back #define pf push_front #define db double #define X first #define Y second #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define...
ALGO
0.999974
3.226452
ece717f3-78f0-4692-8037-e14a85eb434b
z1908144712/ExamCode
LeetCode/123/main.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int maxProfit(vector<int>& prices) { int n = prices.size(); if (n == 0) { return 0; } vector<vector<vector<int>>> dp(n, vector<vector<int>>(3, vector<int>(2))); for (int i = 0; i < n; i++) { for (i...
ALGO
0.999938
5.833364
502819b7-f59d-4133-9bba-8c0fc5720f08
CiciMiaoWWW/Nerf_bio
extensions/ngp_raymarch/include/op_include/eigen/doc/examples/Tutorial_ArrayClass_interop.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { MatrixXf m(2,2); MatrixXf n(2,2); MatrixXf result(2,2); m << 1,2, 3,4; n << 5,6, 7,8; result = (m.array() + 4).matrix() * m; cout << "-- Combination 1: --" << endl << result << endl << end...
ALGO
0.999684
4.589762
b97ea7c3-d774-4bdd-a56e-2a6596d9dd98
NephrenCake/Algorithm
AcWing/算法基础课/第一讲 基础算法/803. 区间合并.cpp
#include <iostream> #include <algorithm> using namespace std; typedef pair<int, int> PII; const int N = 100010; int n, k; PII a[N], ans[N], cur = {-0x3f3f3f3f, -0x3f3f3f3f}; int main() { cin >> n; for (int i = 0, l, r; i < n; i++) cin >> l >> r, a[i] = {l, r}; sort(a, a + n); for (int i = 0; i < n; ...
ALGO
0.99996
4.250548
bc42c8c3-4f0d-421b-90b3-c4e7ebef8d5f
vuquangsang/VQS
e1.cpp
/* Vu Quang Sang from Le Khiet High School for Gifted */ #include <bits/stdc++.h> using namespace std; //#define ll int #define lg(x) __lg(x) #define alla(a,n) a+1,a+n+1 #define el "\n" #define all(x) x.begin(),x.end() #define pb push_back #define ll long long #define fi first #define ...
ALGO
0.99974
3.887783
8fac89c3-3934-4688-ab47-e9211b53d415
ishandutta2007/codeforces
adalbert/normal/864/B.cpp
#include <iostream> #include <cstdio> #include <vector> #include <map> #include <unordered_map> #include <set> #include <string> #include <cmath> #include <algorithm> #include <assert.h> #include <memory.h> #include <string.h> #include <complex> #include <queue> #include <cstdlib> #include <ctime> #include<bits/stdc++....
ALGO
0.999777
4.013608
96c85131-f5d5-4de7-9380-508af46bc3d3
khangvnguyen/learn_algo_big_o_coding
Big-O Coding Green 11/Lect12_Bai2.cpp
#include <iostream> using namespace std; struct Node{ double data; Node *next; }; struct LinkedList{ Node *head; Node *tail; }; Node* createNode(double x); Node* min(LinkedList lst); Node* createNode(double x){ Node *p = new Node; p->data = x; p->next = NULL; return p; } void init(L...
ALGO
0.999872
3.85022
eaebd6bb-edaf-4af0-98b0-43ea07ef1098
airhood/Sorting-Algorithms
SortingAlgorithms/SelectionSort.cpp
void SelectionSort(int* arr, int n) { int temp; for (int i = 0; i < n - 1; i++) { int min = i; for (int j = i + 1; j < n; j++) { if (arr[j] < arr[min]) { min = j; } } temp = arr[i]; arr[i] = arr[min]; arr[min] = temp; } }
ALGO
0.999981
5.074042
60fb482e-ca14-46fd-a19c-2811339a59cd
Rainboylvx/pcs
vjudge/CodeForces/590c/2.cpp
#include<bits/stdc++.h> using namespace std; #define Fopen freopen("_in.txt","r",stdin); freopen("_out.txt","w",stdout); #define LL long long #define ULL unsigned LL #define fi first #define se second #define pb push_back #define ep emplace_back #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 #define lch(x) tr[x].son...
ALGO
0.999802
3.966759
d1f756fb-b2c4-462b-a059-68c01baf1279
anselm/augmentia
bullet/btRaycastVehicle.cpp
#include "btVector3.h" #include "btRaycastVehicle.h" #include "btSolve2LinearConstraint.h" #include "btJacobianEntry.h" #include "btQuaternion.h" #include "btDynamicsWorld.h" #include "btVehicleRaycaster.h" #include "btWheelInfo.h" #include "btMinMax.h" #include "btIDebugDraw.h" #include "btContactConstraint.h" stati...
ALGO
0.96166
5.4367
73f89245-206b-4285-8611-fa9e27f8bae5
nancejk/somap
src/tests/somapfunctors_tests.cpp
#include <somapfunctors.hpp> #include <memory> bool somapfunctor_cartesian_distance(int argc, char *argv[]) { cartesian_distance cDist; weights w0, w1, w2, w3; // Set the weights to form pythagorean triples when compared to the // origin. Should give 5, 13, 25 respectively. w0.push_back(0), w0.push_back(0...
TEST
0.931507
5.096097
77235718-a92c-4330-9f2a-83558e1d406f
BAYMAXWLTT/TritonHttpServer
parser.cpp
/****************************************************************************************** Project: UCSD CSE291C Course Project: Web Server for TritonHTTP Author: 1. Hou Wang Parser.cpp Verify the header format and parse the request into valid request data structure **************************************************...
WEB
0.875014
4.059713
02a6965f-4e3c-467c-933f-9e64cdb9d2b0
Shintaro0105/Competitive-programming
atcoder/recommendation/CODEFESTIVAL2014a.cpp
#include <iostream> #define rep(i,n) for(int i = 0;i < (n);i++) using namespace std; int main(){ int n; cin>>n; double sum=0; double a[n]; rep(i,n){ cin>>a[i]; if(i!=0){ sum+=a[i]-a[i-1]; } } printf("%lf\n",sum/(double)(n-1)); return 0; }
ALGO
0.989114
3.088464
4a6e7153-7fa5-47c9-999e-40335d6ee253
atharv180904/roarm_m2s_working
roarm_ws_em0/src/plan_using_moveit/src/movetocirclecmd.cpp
#include <memory> #include <cmath> #include <vector> #include <iostream> #include <Eigen/Dense> / #include "roarm_moveit_cmd/ik.h" #include <rclcpp/rclcpp.hpp> #include <moveit/move_group_interface/move_group_interface.h> #include <geometry_msgs/msg/pose.h> #include <tf2_geometry_msgs/tf2_geometry_msgs.h> #include "roa...
WEB
0.982257
5.968018
efdeb009-8db4-4dbc-8200-de507c7130a8
romanfffg/roman
#3.cpp
#include <iostream> #include <cstdlib> #include <string> using namespace std; int main() { string str; getline(cin,str); str.length(); for (int i = 0; i < str.length(); i++) { if (str[i] == 'A') str[i] = 'a'; if (str[i] == 'E') str[i] = 'e'; if (str[i] == 'Y') str[i] = 'y'; i...
ALGO
0.913737
4.104416
ed03c222-70d9-4d4a-ac88-fcfa07a59023
Nitish252000/LeetCode_Solution
CPP/Binary Tree BFS/Kth Largest Sum in a Binary Tree.cpp
class Solution { public: long long kthLargestLevelSum(TreeNode* root, int k) { priority_queue<long>pq; queue<TreeNode*>q; q.push(root); while(!q.empty()){ long size=q.size(); long sum=0; for(int i=0;i<size;i++){ TreeNode* ele=q.fron...
ALGO
0.999959
5.875783
8f0423ec-fd38-4f8a-bb12-3287124b4048
OddEssA/BambuStudio-SoftFever
src/libigl/igl/cat.cpp
#include <cstdio> // Bug in unsupported/Eigen/SparseExtra needs iostream first #include <iostream> #include <unsupported/Eigen/SparseExtra> // Sparse matrices need to be handled carefully. Because C++ does not // Template: // Scalar sparse matrix scalar type, e.g. double template <typename Scalar> IGL_INLINE void...
ALGO
0.850163
5.49637
f8e3445e-e3d4-438d-8b07-097886a01c2e
SeeleVolle/cann-ops
src/norm/batch_norm_v3/op_host/batch_norm_v3_welford_tiling.cpp
/*! * \file batch_norm_v3_welford_tiling.cpp * \brief */ #include "batch_norm_v3_tiling.h" static constexpr uint64_t BNV3_WELFORD_R0_SPLIT_NOT_ALIGN_TILING_KEY = 1000; static constexpr uint64_t BNV3_WELFORD_R0_SPLIT_ALIGN_TILING_KEY = 1001; static constexpr uint64_t BNV3_WELFORD_R1_SPLIT_NOT_ALIGN_TILING_KEY = 100...
TOOL
0.934873
5.836713
20bfe815-5af9-41b7-b58c-55b06fe401a5
Amanthakur25/C----PROGRAMING
Lecture057 Stack Questions/celebrity.cpp
//Initial template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution { private: bool knows(vector<vector<int> >& M, int a, int b, int n) { if(M[a][b] == 1) return true; else return false; } ...
ALGO
0.999877
6.005659
957ec94f-2f31-4a5c-9363-6fa3c48787df
hajimeIppo-cmd/cp-codes
Baekjoon OJ/17000-17999/17384.cpp
#include <bits/stdc++.h> using namespace std; int n, sz; string ans; void f(int l, int r, int cnt, int skipped) { int len = r - l + 1; if (len == cnt) { for (int i = l; i <= r; i++) ans[i] = '#'; return; } if (len == 1) return; int mid = (l + r) >> 1; if (!skipped && cnt ...
ALGO
0.99998
3.448696
9a008378-dbce-463e-b405-b37c5c87021b
llabarge13/CSE687OOD_Project1
MapReduce/sorting.cpp
// sorting.cpp // Lyndsay LaBarge // CSE687 Object Oriented Design // Project 1 // April 28, 2022 // // Sorting class implementation #include <iostream> #include <boost/tokenizer.hpp> #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> #include "sorting.h" // Sort map output from an input file. //...
ALGO
0.994136
5.887431
fdfb33d6-67a4-46bc-906b-63a84b41f0d2
Fork512Hz/Fork512Hz_Codeforces
_Archived/2024_04/940/B.cpp
#include<cstdio> #include<algorithm> #include<iostream> #include<cstring> #include<utility> #include<vector> #include<cmath> using namespace std; typedef pair<long long, long long> pii; typedef vector<long long> vint; typedef long long ll; //#define DEBUG #define MULTI #ifdef DEBUG const long long N = 1000; #endif #i...
ALGO
0.999889
3.237169
67216831-b45d-4bdb-a359-89c27a696979
zeeSaan25/Phitron_codes_cpp
find_min_object.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int #define boost() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); class Student{ public: string name; int roll; int marks; }; int main(){ boost(); int n; cin>>n; Student a[n]; for(int i=0; i<n; i++){ ...
ALGO
0.999468
3.944973
a1063f74-0be3-47b1-9cc4-b1a12b7aacea
subhamgupta053/programming
codechef/oct_challenge/Operation on a matrix/main.cpp
#include <iostream> using namespace std; int main() {int t,n,m,q; cin>>t; while(t--) {int r,c,ae=0,ao=0,anull=0,bo=0,be=0,bnull=0; long long coun=0; cin>>n>>m>>q; cout<<n<<m<<q; //int arr[n+1][m+1]; //for(int z=0;z<n+1;z++) // for(int p=0;p<m+1;p++) //arr[z][p]=0; //cout<<n<<" "...
ALGO
0.999379
3.226749
56963308-3955-4dca-8e40-38e3faa82b28
theblazingone/summer_code_dsa
760. Find Anagram Mappings.cpp
class Solution { public: vector<int> anagramMappings(vector<int>& A, vector<int>& B) { vector <int> res; for (int i = 0; i < B.size(); i++){ for (int j = 0; j < A.size(); j++){ if (A[i] == B[j]){ res.push_back(j); } } ...
ALGO
0.999958
6.07714
9f4775c5-be84-4f74-b06c-a0e3af28f7f2
Nih1tGupta/Leetcode-GFG
Basic/Sum of distinct elements/sum-of-distinct-elements.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: // Find the sum of all non-repeated elements // in an array int findSum(int arr[], int n) {long long sum=0; sort(arr,arr+n); for(long long i=0;i<n;i++){ ...
ALGO
0.999512
6.128873
f22e0702-5181-44f6-8f07-1bf55ee100f0
snlw/Codeforces
A/1064A.cpp
#include<iostream> #include<algorithm> using namespace std; int main(){ int a[3]; cin >> a[0] >> a[1] >> a[2]; sort(a, a+3); if (a[0] + a[1] > a[2]) cout << 0; else cout << a[2] - a[0] - a[1] + 1; return 0; }
ALGO
0.999964
3.794003
faa58175-a1c0-4a99-98fe-f4a6d4853b26
tangxiangru/NOIP
4.3/Heavy_Transportation.cpp
#include <iostream> #include <cstdio> #define MAXV 1010 #define min(a,b) (a<b?a:b) using namespace std; int map[MAXV][MAXV],n,m; int dijkstra(){ int vis[MAXV],d[MAXV],i,j,v; for(i=1;i<=n;i++){ vis[i]=0; d[i]=map[1][i]; //这个时候d不代表从1到n的最短路径,而是最大承载量 } for(i=1;i<=n;i++){ int f=-1; for(j=1;j<=n;j++) if(!vis[j] && d[j]>f){...
ALGO
0.999916
4.065377