uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
57e41b01-b53e-4669-ba83-991e12388279
ishandutta2007/codeforces
yuma_/normal/1153/E.cpp
#include "bits/stdc++.h" #pragma GCC optimize("Ofast") //for CodeForces #pragma GCC target("avx,avx2") #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ll=long long ; int out(int l, int r, int u, int d,bool ok=false) { if (!ok) { cout << "? " << l << " " << u ...
ALGO
0.999865
3.327538
f50b87a0-3c69-4ac7-a335-715524caf9e0
KnightKnight27/GCL
kruskal.cpp
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMM _______ _______ MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMM | | |\ | | MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMM | | | ...
ALGO
0.999972
4.834664
116f41d2-3e9d-4448-a9c8-606c8acd455e
google/libcxx
test/utilities/template.bitset/bitset.members/op_xor_eq.pass.cpp
// test bitset<N>& operator^=(const bitset<N>& rhs); #include <bitset> #include <cstdlib> #include <cassert> #pragma clang diagnostic ignored "-Wtautological-compare" template <std::size_t N> std::bitset<N> make_bitset() { std::bitset<N> v; for (std::size_t i = 0; i < N; ++i) v[i] = static_cast<bool>...
TEST
0.957259
7.076214
3c009164-a2d3-4cad-99f9-a953f1c96b2b
mdshihabmahmud/30-Days-of-Code
Inheritance.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; class Student{ protected: string firstName; string lastName; int phone; public: Student(string fname,string lname,int p){ firstName=fname; la...
TOOL
0.901137
4.16195
1a80adc1-9db0-4a91-8e38-5b92cd99892e
Mr-Magnificent/ds-algo
class37_tree/ceilFloor.cpp
#include "construct_tree.hpp" using namespace std; class Limit { public: int floor; int ceil; Limit(int floor, int ceil) : floor(floor), ceil(ceil) { } }; void findCeilFloor(Node root, int data, Limit &sol) { if (root.data >= data) { sol.ceil = min(root.data, sol.ceil); } ...
ALGO
0.999973
5.082991
62fe9367-2206-4e34-8b94-e5423332a0a7
PixelExperience-EXCLUSIVE-edition/android_frameworks_av
media/module/codecs/amrnb/dec/src/d_plsf_3.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/d_plsf_3.c Functions: D_plsf_3 ------------------------------------------------------------------------------ INPUT AND OUTPUT DEFINITIONS Inputs: st -- Pointer to type struct D_plsfState mo...
ALGO
0.999402
6.623433
bf8f1878-2225-4fb5-8ddd-6bb91eb4849b
Fraunhofer-AISEC/cryptsan-llvm-project
libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/set_difference.pass.cpp
// UNSUPPORTED: clang-8 // <algorithm> // template<InputIterator InIter1, InputIterator InIter2, typename OutIter> // requires OutputIterator<OutIter, InIter1::reference> // && OutputIterator<OutIter, InIter2::reference> // && HasLess<InIter2::value_type, InIter1::value_type> // && HasLess<I...
TEST
0.905222
6.895105
351635e7-776b-4ae5-abb2-c644a63f6bcc
hclown9804/interview
leetcode/119.杨辉三角-ii.cpp
/* * @lc app=leetcode.cn id=119 lang=cpp * 第0行存储偶数行数据,第1行存储奇数行数据 * 使用行数&1进行计算 * [119] 杨辉三角 II */ // @lc code=start class Solution { public: vector<int> getRow(int n) { vector<vector<int>> f(2, vector<int>(n + 1)); for (int i = 0; i <= n; ++i) { f[i & 1][0] = f[i & 1][i] = 1; ...
ALGO
0.999988
6.232875
eca31d25-e298-4369-a83f-7dfb000800e3
philipplenk/adventofcode23
05/02.cpp
#include <algorithm> #include <iostream> #include <iterator> #include <limits> #include <numeric> #include <optional> #include <ranges> #include <string> #include <sstream> #include <tuple> #include <unordered_map> #include <vector> struct mapping_range { unsigned long source_start, destination_start, length; friend...
ALGO
0.998651
4.462681
bb246829-eff7-46ab-ad5a-a6d357dab37e
sarvex/leetcode-umka
solution/0100-0199/0188.Best Time to Buy and Sell Stock IV/Solution.cpp
class Solution { public: int maxProfit(int k, vector<int>& prices) { int dp[k + 1][2]; memset(dp, 0, sizeof(dp)); for (int i = 1; i <= k && !prices.empty(); ++i) { dp[i][0] = -prices[0]; } for (int i = 1; i < prices.size(); ++i) { for (int j = 1; j <= ...
ALGO
0.999979
5.926954
26a24e11-8c49-44f1-a2fe-d8768bc6d8c9
Ryan-hub-bit/Mypintool
source/tools/Maid/Maid.cpp
#include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <assert.h> #include <iostream> #include <ostream> #include <fstream> #include <sstream> #include <vector> #include <map> #include <set> #include <string> #include <iomanip> #include "pin...
TOOL
0.916976
5.510718
9fb3a96c-5692-4964-aa19-b793d5ba0dd2
shetty08/DSA
quiksort.cpp
#include<bits/stdc++.h> using namespace std; int partition(vector<int> &arr, int low,int high){ // choose the leftmost element as pivot int pivot = arr[low]; int i = low; int j = high; while (i < j) { while(arr[i]<= pivot && i <= high -1){ i++; } while (arr[j] > p...
ALGO
0.999961
5.512922
2e568761-2858-490b-8edd-eeec3c6e3c57
raincross7/code-similarity
codes/train_code/problem282/problem282_306.cpp
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <vector> #define ll long long #define ull unsigned long long #define YES cout << "YES" << endl #define NO cout << "NO" << endl #define yes cout << "Yes" << endl #define no cout << "No" << endl #define FOR(i,start,sto...
ALGO
0.999806
3.425078
897b459f-c904-4c6f-80b5-c5fa37050ed9
Cloudxtreme/arangodb
3rdParty/boost/1.61.0/libs/compute/perf/perf_search.cpp
#include <algorithm> #include <iostream> #include <numeric> #include <vector> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/search.hpp> #include <boost/compute/container/vector.hpp> #include "perf.hpp" int rand_int() { return static_cast<int>((rand() / double(RAND_MAX)) * 25.0); } int ma...
ALGO
0.99584
5.499373
2a70156d-6d36-4f0c-a198-3a602166fb45
vian96/study_tasks
asm/asm/asm.cpp
#include "asm.h" #include "../config.h" #include "../commands.h" #include "string_utils.h" #include "labels.h" #include "asm_args.h" #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <assert.h> #include <string.h> int main (int argc, char *argv[]) { if (argc != 2) { printf ( ...
TOOL
0.920791
4.319734
d98c88e6-9564-463a-ad27-32df57ce3999
zhnxjtu/CaKDP
pcdet/ops/iou3d_nms/src/iou3d_cpu.cpp
#include <stdio.h> #include <math.h> #include <torch/serialize/tensor.h> #include <torch/extension.h> #include <vector> #include <cuda.h> #include <cuda_runtime_api.h> #include "iou3d_cpu.h" #define CHECK_CUDA(x) do { \ if (!x.type().is_cuda()) { \ fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE_...
ALGO
0.99669
5.534565
fa23415d-fc96-47d0-885d-2f36e249b814
sonynanaVN/LAB6_SapXep
LAB6.1_sapXepChon.cpp
//Sap xep chon (selection sort) #include<iostream> using namespace std; void nhap(int a[], int n){ cout<<"===NHAP MANG==="<<endl; for(int i = 0; i < n; i++){ cout<<"Nhap a["<<i<<"] = "; cin>>a[i]; } } void xuat(int a[], int n){ for(int i = 0; i < n; i++){ cout<<a[i]<<" "; } } int sapXepChon(int a[], int n){ ...
ALGO
0.999306
4.198516
ab813f75-f448-4c0c-8cbb-3581a8815b2e
ratea/abc
arc086/a.cpp
#include "bits/stdc++.h" using namespace std; int main(){ int n,k; cin>>n>>k; vector<int> a(n,0); for(int i=0;i<n;i++){ int b; cin>>b; a[b]++; } sort(a.begin(),a.end()); int ans=0; int np=0; for(int i=0;i<k;i++){ np+=a[n-1-i]; } ans=n-np; if(ans<0)ans=0; cout<<ans<<endl; return 0; }
ALGO
0.999948
3.356313
18529c16-6b97-4224-967e-bffd0813d795
choshina/EfficientCausationMonitor
Online/src/update_transducer.cpp
#include "stdafx.h" #include <transducer.h> #include <algorithm> #include <math.h> namespace CPSGrader { double transducer::update_robustness(){ #ifdef DEBUG__ cout << "> transducer:update_robustness IN."<< endl; #endif compute_robustness(); #ifdef DEBUG__ cout << "< transd...
ALGO
0.988048
4.393328
5edf7480-9758-4a26-98e4-b6b9ea056cdf
jiya-solanki22/DSA-Practice-Questions
maxSumSubsequence.cpp
// C++ code to implement the approach #include <bits/stdc++.h> using namespace std; // Function to find the maximum sum int findMaxSum(vector<int> arr, int N) { // Declare dp array int dp[N][2]; if (N == 1) { return arr[0]; } // Initialize the values in dp array dp[0][0] = 0; dp[0][1] = arr[0]; // Loop ...
ALGO
0.999979
5.747367
7b804a01-1705-4b8a-9c77-082fabf068dd
zhming0/Mingorithm
ACM/BOJ1076.cpp
#include <iostream> #include<string> #include<stdlib.h> using namespace std; int main (int argc, char * const argv[]) { string s; int k,i,j,ans; while (cin>>s) { cin>>k; ans=0; for (i=0; i<s.length(); i++) { if (s[i]=='a') { continue; } for (j=i+1; j<s.length(); j++) { if (s[j]!='a'&&(s[i]-...
ALGO
0.999134
3.242617
b0c611ec-d8cd-47a8-a57d-e35948d0cf7d
josemiguelmo2/esp32-demo
lib/face_recognition_notl_inferencing/src/edge-impulse-sdk/tensorflow/lite/micro/kernels/slice.cpp
#include <array> #include "edge-impulse-sdk/tensorflow/lite/c/builtin_op_data.h" #include "edge-impulse-sdk/tensorflow/lite/c/common.h" #include "edge-impulse-sdk/tensorflow/lite/kernels/internal/tensor_ctypes.h" #include "edge-impulse-sdk/tensorflow/lite/kernels/internal/portable_tensor.h" #include "edge-impulse-sdk/t...
TOOL
0.855909
7.604354
200cc2cd-1974-449b-974a-c1ebf64d0fd8
vaib0t/Competitive-Programming
Interview Bit/Max Min.cpp
int Solution::solve(vector<int> &A) { int n=A.size(),m1=INT_MIN,m2=INT_MAX; for(int i=0;i<n;i++){ m1=max(m1,A[i]); m2=min(m2,A[i]); } int ans=m1+m2; return ans; }
ALGO
0.999819
5.166453
1cc1d89f-1b2f-42db-a001-235b04851e3f
rokcej/minecraft
src/utils/math.cpp
#include "math.h" #include <cmath> namespace math { int RoundUpToMultipleOf4(float x) { return ((int)std::ceil(x) + 3) & ~0x3; } void SolveQuadraticEquation(float a, float b, float c, float* x_add, float* x_sub) { float sqrt_D = std::sqrt(b * b - 4.0f * a * c); float inv_2a = 1.0f / (2.0f * a); if (x_add) { *...
ALGO
0.985461
4.703316
741467bb-792f-4626-877f-337a635075c3
CUNY-TTP-Technical-Interview-Prep/cuny-ttp-algo-summer2021
eliHenderson/assignments/slidingwindow/lc53/lc53.cpp
using namespace std; #include <iostream> #include <vector> class MaxSumSubArrayOfSizeK { public: static int MaxSumSubArray(int k, const vector<int>& arr) { int maxSum = 0 // Write your code here return maxSum; } }; int main(int argc, char* argv[]) { cout << "Maximum sum of a subarray of size K: " ...
ALGO
0.999768
6.241036
3277ea29-400e-4ece-844c-e33b52356986
imshakibhasan/my-algorithms
codeforce/four_segments.cpp
/** * @file four_segments.cpp * @author Shakib Hasan (<EMAIL>) * @brief * @version 0.1 * @date 2023-03-04 * * @copyright Copyright (c) 2023 * problem : https://codeforces.com/problemset/problem/1468/E */ #include<iostream> #include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; w...
ALGO
0.999468
5.811552
6da1cfdb-59a4-473f-aff6-1b5484d9c20a
Nibaron/LEETCODER
Interview/W3/primeInRange.cpp
#include<bits/stdc++.h> using namespace std; class solution{ public: vector<int> prime(int l, int r) { vector<int> ans; for(int i=l; i<=r; i++) { if(i==0 || i==1) continue; bool flag=true; for(int j=2; j<=i/2; j++) { if(i % ...
ALGO
0.99986
4.189477
b4dbe344-5e74-46b5-b76e-6b2dbb150278
sakshamssr/DSA
Patterns/10_rightTriangle.cpp
#include<iostream> using namespace std; // * // ** // *** // **** // ***** // **** // *** // ** // * int main(){ int N; cout<<"Enter a Number: "; cin>>N; int starscount=1; for(int i=1; i<=(2*N); i++){ for(int j=1; j<=starscount; j++){ cout<<"*"; } if(i<N){ ...
ALGO
0.999898
4.085143
6e4058c7-f8f1-4e2a-9fa1-17731607b518
ensermuyigezu/Leetcode-Solutions
C++/981_Time_Based_Key-Value_Store.cpp
class TimeMap { public: /** Initialize your data structure here. */ unordered_map<string, vector<pair<string, int>>> mp; // [key, vec[val, time]] TimeMap() { } void set(string key, string value, int timestamp) { mp[key].push_back({value, timestamp}); } string get(string k...
ALGO
0.99908
7.253129
e9f5cf7f-7490-40ee-a3e6-f83182be6585
Totoroz/Books-solutions
C++ for Everyone, 2nd Ed, Horstmann/Chapter3/P3-20.cpp
//The tax.cpp program uses a simplified version of the 2008 U.S.income tax schedule. //Look up the tax brackets and rates for the current year, for both single and married //filers, and implement a program that computes the actual income tax. #include <iostream> #include <string> using namespace std; int main() { ...
ALGO
0.998839
4.746234
6d8c3ab8-62ad-46fd-8fc5-0d81dfb2b851
Kartik-Mathur/LiveBatchNov2020
Lecture-13/SumOfArray.cpp
#include <iostream> using namespace std; int SumArray(int *a,int n){ // base case if(n == 0){ return 0; } // recursive case int ChotaArraySum = SumArray(a+1,n-1); int BadaArraySum = a[0]+ChotaArraySum; return BadaArraySum; } int Sum2(int *a,int n,int i){ // base case if(i == n){ return 0; } // recur...
ALGO
0.998962
3.641543
428ef0ea-26f2-4cdf-a287-c07566f886b7
AnLau25/HackerRank
Hard/noPrefix/main.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> // for ltrim, rtrim #include <sstream> // for split #include <compare> // for spaceship operator (C++20) #include <iomanip> #include <unordered_map> using namespace std; string ltrim(const string &); string rtrim(const string &); vect...
ALGO
0.999333
5.585848
01fa6127-d35e-43cb-91d9-5074e457c35b
khs960616/Algorithm
boj5430.cpp
#include <bits/stdc++.h> using namespace std; /* https://www.acmicpc.net/problem/5430 문자열 파싱, 구현 */ void parseString(string s, deque<int>& v) { s = s.substr(1, s.size()-2); stringstream ss(s); string token; int idx = 0; while (getline(ss, token, ',')){ v[idx++] = stoi(token); } } stri...
ALGO
0.998708
5.475562
753a8bd2-5028-40e3-9a20-3b808b85f0a5
JamesQAQ/Coding-Practices
ZeroJudge/Solutions/a304. NOIP2011 Day2.3.观光公交/2012-03-06_1078728.cpp
#include <cstdio> struct Node {int t,a,b;} people[10000]; int input(){ char c=getchar(); while (c>'9'||c<'0') c=getchar(); int x=c-48;c=getchar(); while (c<='9'&&c>='0') x=x*10+c-48,c=getchar(); return x; } int main() { int n,m,k,t,a,b,wait[1001]={},enter[1001],ans=0,g[1001],sum[1001]={},d[1001...
ALGO
0.999893
3.483416
0b47f3dc-070f-4f80-8b45-eb524e981f74
jk-jung/problem-solving
codeforces/Codeforces Round 73x/R731_div3_C.cpp
#include <string.h> #include <stdio.h> #include <math.h> #include <map> #include <vector> #include <numeric> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; typedef pair<int, int> pi; #define mp make_pair #define pb push_back #define F first #define S second #define ...
ALGO
0.999922
3.323553
eefde488-e8d0-4b1c-95f0-6da91da009c7
LMODroid/platform_development-old
vndk/tools/header-checker/src/utils/config_file_test.cpp
#include "utils/config_file.h" #include <sstream> #include <string> #include <vector> #include <gtest/gtest.h> namespace header_checker { namespace utils { TEST(ConfigFileTest, Parse) { std::stringstream stream(R"( // Comment line starts with slash /* embedded comment */ { "global": { "ignore_linker_set_key...
TEST
0.899839
7.433345
0975f2e2-8a11-4dd0-868a-cca31c188d47
shuest/leetcode
238.cpp
#include<iostream> #include<cstdio> #include<cmath> #include<string> #include<cstring> #include<algorithm> #include<vector> #include<set> #include<map> #include<stack> #include<queue> using namespace std; //ÿλϵλϵij˻ //ֹʹó //ij˻ұij˻ class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { vecto...
ALGO
0.999986
3.786238
8a0dae7e-ce47-41a9-a078-c42a6646cd02
VanshikaNavya/Leetcode
DFS of Graph - GFG/dfs-of-graph.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to return a list containing the DFS traversal of the graph. void dfs(int node, vector<int> adj[], vector<int> &ans, vector<int> &vis){ vis[node]=1; ans.push_back(nod...
ALGO
0.999985
6.426725
851a62b9-f580-4e00-a846-3c9fb495a925
ishandutta2007/codeforces
tiramister/normal/1037/B.cpp
/* ---------- STL Libraries ---------- */ // IO library #include <cstdio> #include <fstream> #include <iomanip> #include <ios> #include <iostream> // algorithm library #include <algorithm> #include <cmath> #include <numeric> // container library #include <array> #include <bitset> #include <deque> #include <map> #inc...
ALGO
0.999958
4.179211
1d40cc70-cd83-4b8d-80af-9d682391d932
HenryGenry/Lab6
lab6.2 (3).cpp
// task3.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; int power(int a, int n) { if (n % 2 == 0) return (!n) ? 1 : power(a * a, n / 2); else return (!n) ? 1 : a*power(a, n - 1); } int _tmain(int argc, _TCHAR* argv[]) { int a, n; cin ...
ALGO
0.999714
5.703463
4cc3f508-be2b-4414-86c6-394793c9cbcb
piyushsir/DSA-
DSA/bit5.cpp
#include<bits/stdc++.h> using namespace std; int main() { /*int a=-7; cout<<a<<endl; cout<<bitset<32>(a)<<endl; int m=-1; a=m^(a-1); cout<<a<<endl; cout<<bitset<32>(a)<<endl;*/ /* int a=45; int b=80; cout<<a<<endl; cout<<bitset<8>(a)<<endl; cout<<b<<endl; cout<<bitset<8>(b)<<endl; ...
ALGO
0.999564
3.192437
bb3b173f-b354-41ee-8aad-fcd3a58e35f6
zebreus/hpc-lab
KickOff/cpp11-pi.cpp
/* -*- Mode: C++; c-basic-offset:4 ; -*- */ /* This code borrows heavily from the file mpi-c from the * Argonne National Laboratory. */ #include <chrono> #include <iomanip> #include <iostream> #include <sstream> #include <string> #include <thread> #include <vector> // uncomment to disable assert() // #define NDEBU...
ALGO
0.998133
5.904266
82f9867c-3835-48a4-b641-2a72e1776250
semdoc/system_core
fs_mgr/fs_mgr_fstab.cpp
#include <ctype.h> #include <dirent.h> #include <errno.h> #include <fnmatch.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/mount.h> #include <unistd.h> #include <algorithm> #include <array> #include <utility> #include <vector> #include <android-base/file.h> #include <android-base/parseint...
TOOL
0.948468
7.347133
bfb3d5c4-e69e-46e9-a9e4-8124f66aa943
Yomna521/Path-planner
Path Planner/src/Eigen-3.3/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_rowwise.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; int main() { Eigen::MatrixXf mat(2,4); mat << 1, 2, 6, 9, 3, 1, 7, 2; std::cout << "Row's maximum: " << std::endl << mat.rowwise().maxCoeff() << std::endl; }
ALGO
0.999392
3.880165
84542556-7522-44cf-aa4d-2ba879da4d8c
ishandutta2007/codeforces
zhylj/normal/1656/E.cpp
#include <bits/stdc++.h> #define gc() getchar() template <typename T> inline void rd(T& x) { int si = 1; char c = gc(); x = 0; while(!isdigit(c)) si = c == '-' ? -1 : si, c = gc(); while(isdigit(c)) x = x * 10 + c - 48, c = gc(); x *= si; } template <typename T, typename... Args> inline void rd(T& x, Args&... args...
ALGO
0.999658
4.710731
14c81471-b15b-4dd9-b6c2-6c61f959ee44
yijial/programming-tools
hw7/rational/calc.cpp
/* * Interactive calculator for expressions with rational numbers. * CSE 374, 15au, HP */ #include "rational.h" #include "token.h" #include "scan.h" #include "parse.h" #include <iostream> #include <string> using namespace std; // print rational r followed by a newline void prrat(Rational r) { cout << r.n() << "/...
TOOL
0.981404
5.4958
65eed42d-c9de-407f-b9c7-5f24b58c75f9
GrownDombo/NerdStudy
주차요금계산/junyongchoi.cpp
#include <string> #include <vector> #include <sstream> #include <unordered_map> #include <map> #include <cmath> using namespace std; vector<string> split(string str, char Delimiter) { istringstream iss(str); // istringstream에 str을 담는다. string buffer; // 구분자를 기준으로 절삭된 문자열이 담겨지는 ...
ALGO
0.996712
5.251432
f1759871-805a-4034-b03e-8cf1600e8e0c
Adityajha0808/MyLeetCode
473-matchsticks-to-square/473-matchsticks-to-square.cpp
class Solution { public: bool func(vector<int>& a, vector<int>& v, int start, int sum, int k, int x) { if(k == 1) return true; if(sum > x) return false; if(sum == x) return func(a, v, 0, 0, k-1, x); for(int i=start; i<a.size(); i++) { if(!v[i]) { v[i] = 1;...
ALGO
0.999955
5.20953
2f360034-4dc4-47bb-b140-c495d734f4b6
coin-or/VRPH
src/VRPSolvers.cpp
#include "VRPH.h" double VRP::RTR_solve(int heuristics, int intensity, int max_stuck, int max_perturbs, double dev, int nlist_size, int perturb_type, int accept_type, bool verbose) { /// /// Uses the given parameters to generate a /// VRP solution via record-to-record travel. ///...
ALGO
0.999962
5.737391
261e8531-33f7-470d-985a-424424a996c3
vmichal/ACM
2019-winter/1/candy.cpp
#include <iostream> #include <vector> #include <numeric> int solve(int pocet_balicku) { std::vector<int> balicky(pocet_balicku); for (int i = 0; i < pocet_balicku; ++i) std::cin >> balicky[i]; int const pocet_bonbonku = std::accumulate(balicky.begin(), balicky.end(), 0); int const cilovy_pocet = pocet_bonbon...
ALGO
0.99875
4.393017
433c5a6f-5613-4931-8aa2-e1abe9b02da1
Apurba94/10-Years-of_Competitive-Programming-Resources-Collection
Codeforces From 2011-2023/0100-0199/121A-LuckySum.cpp
#include <cstdio> #include <iostream> #include <vector> std::vector<long long> findNext(std::vector<long long> luckyVec){ bool done(0); for(int p = 0; p < luckyVec.size(); p++){ if(luckyVec[p] == 4){luckyVec[p] = 7; done = 1; break;} else{luckyVec[p] = 4;} } if(!done){luckyVec.push_bac...
ALGO
0.999861
4.343623
6516001c-e875-47fa-b533-a30f1463faf0
Nikita-Zoteev/study
Лабораторная 10/Лабораторная 10-3.cpp
#include <iostream> using namespace std; int main() { setlocale(LC_ALL, "Rus"); int A; cout << "Введите число: "; cin >> A; if (A % 2 == 0 && A > 9 && A < 100) { cout << "Высказываение истинно" << endl; } else { cout << "Высказываение ложное" << endl; } }
ALGO
0.952116
3.055413
f7539c75-d5d0-4616-9f81-72ebecd0d7eb
kstreets/LaneDetection
opencv/sources/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.99897
6.314088
6421ab7a-f63b-4c19-9966-e36653e4ba56
HariPasapuleti/Leetcode-Problems
0135-candy/0135-candy.cpp
class Solution { public: int candy(vector<int>& ratings) { int n = ratings.size(); vector<int> candy(n, 1); for (int i = 1; i < n; i++) { if (ratings[i] > ratings[i - 1]) { candy[i] = candy[i - 1] + 1; } } for (int i = n - 2; i >= 0; ...
ALGO
0.999995
6.212898
71ac57da-6a1f-4300-96ca-ec90f97e7290
LukaAhac/AdventOfCode
Advent_of_Code_2017/day17.cpp
#include <iostream> #include <vector> int main(void){ int input = 316; int part1Range = 2017; int part2Range = 50000000; std::vector<int> nums {0}; int insertionPosition; int currentPostition = 0;; /* Part1 Iterate 2017 times and insert numbers At the end look the number afte...
ALGO
0.999919
4.777383
0d7a722c-541e-493f-8496-3f47545c2f90
naonao-cola/MyQt
qt5ch20/OpenCV_3.4.3-Source/samples/cpp/travelsalesman.cpp
#include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> #include <opencv2/ml.hpp> using namespace cv; class TravelSalesman { private : const std::vector<Point>& posCity; std::vector<int>& next; RNG rng; int d0,d1,d2,d3; public: TravelSalesman(std::vector<Point> &...
ALGO
0.999985
4.591307
67eab924-4c4f-4121-b5b4-4a47895dffbb
Kwon770/algo-cpp
sol from BOJ/divide_and_conquer/b6549.cpp
// https://www.acmicpc.net/problem/6549 // Divide_and_conquer(9), 히스토그램에서 가장 큰 직사각형 // NUMBER 6549 // Divide and Conquer, https://www.notion.so/sckwon770/Divide-and-conquer-568ac70283ce41b29a01c4e147f4830c #include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; #define endl "\...
ALGO
0.999954
6.155565
940dd69a-b165-4543-be76-cbede0a9a8b9
corretto/corretto-11
src/hotspot/cpu/x86/macroAssembler_x86_sha.cpp
#include "precompiled.hpp" #include "asm/assembler.hpp" #include "asm/assembler.inline.hpp" #include "runtime/stubRoutines.hpp" #include "macroAssembler_x86.hpp" // ofs and limit are used for multi-block byte array. // int com.sun.security.provider.DigestBase.implCompressMultiBlock(byte[] b, int ofs, int limit) void M...
ALGO
0.998271
5.655292
2c3b0efb-3a82-461c-ab89-e470e1ce1d94
ishita4416/CP
Doubly Linked List/dll2.cpp
#include <bits/stdc++.h> using namespace std; //insert at beginning of Doubly linked list struct node{ int data; node *prev; node *next; node(int d){ data=d; prev=NULL; next=NULL; } }; node *printList(node *head) { node *last; while(head !=NULL) { cout<<"...
ALGO
0.999582
4.252434
15cedb1a-15b4-4626-960b-0e9a61692f05
leonardonm15/competitive_programing
random_problems/teste/6.cpp
#include <string> #include <vector> #include <map> #include <algorithm> // para std::sort #include <bits/stdc++.h> using namespace std; using std::map; using std::string; using std::vector; void calc(string curr_word, int index, const string& word, vector<pair<int, string>>& resp, map<string, string>& mtl) { ...
ALGO
0.999052
4.101554
dae6db0f-d7b0-4d70-99e5-9c80b8da6120
calmacdonald/Leetcode
C++/Sign of the product of an array.cpp
class Solution { public: int arraySign(vector<int>& nums) { int count = 0; bool pres=0; for(int i =0; i< nums.size(); i++){ if(nums[i]<0){ count++; } if (nums[i]==0){ pres=1; } } if(count%2==0 &...
ALGO
0.999995
5.676645
2ff6cea5-f0c2-471b-998a-4d9c169e7914
SparshJain2000/Leetcode-solutions
Maths/arithmetic-subarrays.cpp
//Problem Statement /* You are given an array of n integers, nums, and two arrays of m integers each, l and r, representing the m range queries, where the ith query is the range [l[i], r[i]]. All the arrays are 0-indexed. Return a list of boolean elements answer, where answer[i] is true if the subarray nums[l[i]], num...
ALGO
0.999913
5.913871
173c6bd2-1862-4d3f-932c-ad25da87da10
pongsaphol/submission
Codecube/168.cpp
#include <cstdio> #include <vector> #include <algorithm> #include <cstring> using namespace std; const int MAXN = 1e5; int dp[MAXN+5][10]; char arr[MAXN+5], t[] = "codecube"; int main() { // freopen("r", "r", stdin); scanf("%s", arr); int len = strlen(arr); for(int z = 0; z < 8; ++z){ int prev = 1e9; for(i...
ALGO
0.9999
3.521874
6fcd6e7c-9284-4acc-9d8a-285190887523
raincross7/code-similarity
codes/train_code/problem316/problem316_157.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <string.h> using namespace std; int main() { string s; int a, b; cin >> a >> b; cin >> s; string ans = "Yes"; for (int i=0; i<a+b+1; i++) { if (i == a) { if (s[i] != ...
ALGO
0.999894
3.344181
488df545-073b-46f6-82ef-0132e8ea095a
bartvbl/Radial-Intersection-Count-Image-reproduction
src/clutterbox/lib/glm/test/gtx/gtx_fast_trigonometry.cpp
#define GLM_ENABLE_EXPERIMENTAL #include <glm/gtc/type_precision.hpp> #include <glm/gtx/fast_trigonometry.hpp> #include <glm/gtx/integer.hpp> #include <glm/gtx/common.hpp> #include <glm/gtc/constants.hpp> #include <glm/gtc/ulp.hpp> #include <glm/gtc/vec1.hpp> #include <glm/trigonometric.hpp> #include <cmath> #include <...
TEST
0.948034
6.209053
91d2fcca-90db-41c5-a08a-91c5c61763a1
AdarshNandanwar/DSA-and-Competitive-Programming
CodeChef/KCON.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll kadanes(int* arr, int n){ ll max_sum=INT_MIN, sum=0; for (int i = 0; i < n; i++) { sum+=arr[i]; max_sum=max(max_sum, sum); if(sum<0){ sum=0; } } return max_sum; } ll subarray_start(int...
ALGO
0.999935
4.199547
71c646a8-b12a-4547-8694-cdccc6abf2fa
sinian666/code_41_29
cpp_副本10/chapter_stack_and_queue/linkedlist_queue.cpp
/** * File: linkedlist_queue.cpp * Created Time: 2022-11-25 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 基于链表实现的队列 */ class LinkedListQueue { private: ListNode *front, *rear; // 头节点 front ,尾节点 rear int queSize; public: LinkedListQueue() { front = nullptr; rear ...
ALGO
0.993087
5.452713
d1e73ec9-70d7-47ac-bc82-8a35697d4e46
ishandutta2007/codeforces
superguyjm/normal/1746/A.cpp
#include<bits/stdc++.h> #define rep(i,x,y) for(int i=x; i<=y; ++i) using namespace std; const int N=55; int n,k,a[N]; int getint() { char ch; int f=1; while(!isdigit(ch=getchar())) if(ch=='-') f=-1; int x=ch-48; while(isdigit(ch=getchar())) x=x*10+ch-48; return x*f; } bool check() { rep(i,1,n) if(a[i]) return...
ALGO
0.998821
3.604995
72e2d841-a2cd-49bc-928d-8ce4b25acd8d
SWAGATSWAROOP/LeetCode
FirstAndLastIndex.cpp
// 34. Find First and Last Position of Element in Sorted Array // Medium // 15.5K // 366 // Companies // Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. // If target is not found in the array, return [-1, -1]. // You must write an algorith...
ALGO
0.999953
6.673712
a77a4b31-6d27-4d89-a8cf-fc2047721c15
ashib11/Sub_Zero_
B_Vitaliy_and_Pie.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> #define ll long long #define pi acos(-1.0) #define ull unsigned long long #define endl "\n" #define all(v) v.begin(), v.end() #define allr(v) v.r...
ALGO
0.999945
5.05768
873d2aeb-00d7-4f8f-b0c9-075c8da18da5
AlaaYassin1/Mounts-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.998859
6.785645
edf87c8d-5d1c-449c-a356-29b481acab4c
himaniaggarwal2/Leetcode-Problems
second-minimum-node-in-a-binary-tree/second-minimum-node-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.999991
6.25877
93cf6ec6-0189-46dc-a6e3-bd2e3ebcc549
Nakib-Arman/CSE318---ArtificialIntelligence
4.DecisionTree/.history/a_20250710123331.cpp
#include<bits/stdc++.h> using namespace std; class Node { int column_num; string label; unordered_map<string,Node*> children; float threshold; public: Node(int column_num){ this->column_num = column_num; this->label = ""; this->threshold = 0; } Node(string labe...
ALGO
0.999179
4.449341
69ba6503-ecc7-4dce-ba1e-35faaf639bd1
hjiang13/LLMs-in-IR
POJ-104/62/2942.cpp
#include <iostream> using namespace std; int main() { char str[1000]; int i,j,flag=1; cin.getline(str,1000); int len=strlen(str); for(i=0; i<len; i++) { if(flag==0&&str[i]!=' ')cout<<' '; if(str[i]==' ')flag=0; else { flag=1; cout<<str[i]; } } return 0; }
ALGO
0.999244
3.36875
90d71370-20b6-4665-84ac-9f65ed1178ed
rithvikgit/DSA_ProblemSolving
mindMap/HashTable/2262.total-appeal-of-a-string.cpp
class Solution { public: long long appealSum(string s) { long ans = 0; // the total appeal of all substrings ending in the index so far int dp = 0; vector<int> lastSeen(26, -1); for (int i = 0; i < s.length(); ++i) { const int c = s[i] - 'a'; dp += i - lastSeen[c]; ans += dp; ...
ALGO
0.999852
5.893846
66f73d9f-b117-4774-a34a-27da87130575
resi1ience/Connect-Four
Strategy/myJudge.cpp
#include "myJudge.h" bool myuserWin(const int x, const int y, const int M, const int N, int board[13][13]) { //横向检测 int i, j; int count = 0; for (i = y; i >= 0; i--) if (!(board[x][i] == 1)) break; count += (y - i); for (i = y; i < N; i++) if (!(board[x][i] == 1)) ...
ALGO
0.999868
4.163638
680b9342-1ce6-4adf-a3b6-e2dea7aaec16
aduna-kebeda/competitive-programming
0048-rotate-image/0048-rotate-image.cpp
class Solution { public: void rotate(vector<vector<int>>& matrix) { int n = matrix.size(); vector<vector<int>> result(n, vector<int>(n, 0)); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { result[j][n - 1 - i] = matrix[i][j]; } ...
ALGO
0.999944
6.929432
3f74bdb4-7db7-46d1-86e3-554fa0c5e31d
raincross7/code-similarity
codes/train_code/problem426/problem426_3.cpp
#include <iostream> #include <string> #include <vector> #include <queue> #include <utility> #include <algorithm> using namespace std; #define fi first #define se second #define x second #define y first typedef pair<int,int> pii; vector<string> in; int H, W, N; int visited[1024][1024] = {0}; int search_length(char ...
ALGO
0.999331
3.462878
5f0adc60-a5aa-497b-a7ff-ae6aaef86024
jyi0226/baekjoon
Bronze/2745.cpp
#include <iostream> #include <string> using namespace std; int n,sum=0; string s; int main() { cin>>s>>n; for(int i=0;i<s.size();i++){ int val=1; for(int j=1;j<s.size()-i;j++){ val*=n; } if(s[i]-'A'<0)sum+=val*(s[i]-'0'); else sum+=val*(s[i]-'A'+10); } ...
ALGO
0.999797
4.01621
74f8f008-c20a-4757-ba42-b699c79b6eb5
PhysiCell-Models/grammar_samples
BioFVM/BioFVM_solvers.cpp
#include "BioFVM_solvers.h" #include "BioFVM_vector.h" #include <iostream> #include <omp.h> namespace BioFVM{ // do I even need this? void diffusion_decay_solver__constant_coefficients_explicit( Microenvironment& M, double dt ) { static bool precomputations_and_constants_done = false; if( !precomputations_and_...
ALGO
0.999974
3.719785
a33fdc6c-9ce6-438d-bc0d-d32b0148e92c
fdj32/fork_samples
cppreference/w/cpp/container/span/subspan.cpp
#include <algorithm> #include <cstdio> #include <numeric> #include <ranges> #include <span> void display(std::span<const char> abc) { const auto columns{ 20U }; const auto rows{ abc.size() - columns + 1 }; for (auto offset{ 0U }; offset < rows; ++offset) { std::ranges::for_each( abc....
ALGO
0.97723
4.440674
7068f3de-ffc4-41bb-a7d2-e8bf435b75bf
99Alphapriority/AlgorithmsCompilation
code/Leetcode/0115_Distinct_subsequences/distinct_subsequences.cpp
class Solution { public: int dp[1000][1000]; int dfs(string& s, string& t, int i, int j) { if(j == t.size()) return 1; if(i == s.size()) return 0; if(dp[i][j] != -1) return dp[i][j]; if(s[i] == t[j]) dp[i][j] = dfs(s, t, i+1...
ALGO
0.999996
6.203383
0284d4b4-e417-4628-bae4-9c68643d1b31
lsrosa/myLegUp
4.0/llvm/lib/TableGen/StringMatcher.cpp
#include "llvm/TableGen/StringMatcher.h" #include "llvm/Support/raw_ostream.h" #include <map> using namespace llvm; /// FindFirstNonCommonLetter - Find the first character in the keys of the /// string pairs that is not shared across the whole set of strings. All /// strings are assumed to have the same length. stati...
TOOL
0.936575
7.168617
6996f707-c17e-4197-93b7-7fdf6b099547
ChhailengTim/C-plus-plus
cpp-exercises-interviews/pattern12.cpp
#include <iostream> using namespace std; int main(){ int n=5; for(int i=1;i<=n;i++){ for(int j=i;j<=i;j++){ cout<<" "; } for(int j=i;j<n;j++){ cout<<" *"; } for(int j=i;j<=n;j++){ cout<<" *"; } cout<<""<<endl; } return 0; }
ALGO
0.999945
3.423051
82673a36-91e5-4287-a3f9-a8754b29049a
PointCloudLibrary/pcl
apps/in_hand_scanner/src/integration.cpp
#include <pcl/apps/in_hand_scanner/integration.h> #include <pcl/apps/in_hand_scanner/utils.h> #include <pcl/apps/in_hand_scanner/visibility_confidence.h> #include <pcl/kdtree/kdtree_flann.h> #include <iostream> #include <limits> #include <vector> ///////////////////////////////////////////////////////////////////////...
ALGO
0.981817
3.192557
7a63c042-af8e-414b-ba99-21da031e5bb2
sadaqat-ali-shaker/PDC
pdc assignment/assignment 2/PDC_Assignment_2/task3.cpp
#include<stdio.h> #include<stdlib.h> #include<mpi.h> #define SIZE 5 int main(int argc,char** argv){ int rank,size; MPI_Init(&argc,&argv); MPI_Comm_rank(MPI_COMM_WORLD,&rank); MPI_Comm_size(MPI_COMM_WORLD,&size); if(size<4){ if(rank==0) printf("need atleast 4processes!\n"); ...
ALGO
0.999184
3.481173
e88eb5be-0175-45b9-a264-d2572834e705
Abhishek-00009/DS-Web
C++_cn/Lecture_1/even1_to_N.cpp
//program to print even numbers ut #include<iostream> using namespace std; int main(){ int i=1,N; cout<<"Enter the value of N:-"<<endl; cin>>N; while(i<=N){ if(i%2==0) { cout<<i<<endl; } i=i+1; } return 0; }
ALGO
0.958195
3.204738
f9c7cdb4-f419-4dac-99b2-64652cf927cf
jimdnguyen/UCM_CSE_30
Lab 7/Search.cpp
#include<iostream> #include "BST.h" #include "RandomSupport.h" #include "BSTUtil.h" int main() { long N, value; std::cin>>N;//Read value from keyboard Node *root = nullptr;//Create empty BST randomizer gen = new_randomizer();//Initialize random number generator uniform_distribution dist = new_distr...
ALGO
0.999382
3.663366
53dd16ac-771b-4953-941b-512134813f9a
Carnival02/LEETCODE
LargestRectangle.cpp
//Largest Rectangle in Histogram class Solution { private: vector<int>nextsmallerElement(vector<int>arr,int n){ stack<int>s; s.push(-1); vector<int>ans(n); for(int i=n-1;i>=0;i--){ int curr=arr[i]; while(s.top()!=-1&&arr[s.top()]>=curr){ s.pop(); } ans[i]...
ALGO
0.99989
6.584932
a3097378-892d-446c-82d3-cca885ab9906
deepak2k03/DSA
14_Trees/22_Check_Symmetric_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.99999
6.341383
22520d5c-4725-4a5f-a511-d1568d9fd08c
nikkaramessinis/Fractal_Images
Fractal Creator/Fractal Creator/Manderbrot.cpp
#include "Manderbrot.h" #include <complex> #include <iostream> using namespace caveofprogramming; using namespace std; Manderbrot::Manderbrot() { } Manderbrot::~Manderbrot() { } int caveofprogramming::Manderbrot::getIterations(double x, double y) { complex<double>z = 0; complex<double>c(x,y); int ite...
ALGO
0.998031
4.757427
c0406cf1-8f93-414e-8a80-356b975a76a5
DownloadADuck/c2c-gem5
src/systemc/tests/systemc/misc/stars/star102573/star102573.cpp
/***************************************************************************** star102573.cpp -- Original Author: Preeti Panda, Synopsys, Inc., 2000-08-09 *****************************************************************************/ /***************************************************************************...
ALGO
0.994976
3.452835
48c880c0-a2f2-4ecc-9bf9-a93f125508ff
ishandutta2007/codeforces
cz_xuyixuan/normal/1314/B.cpp
#include<bits/stdc++.h> using namespace std; const int MAXN = 18; const int MAXS = (1 << 17) + 5; typedef long long ll; template <typename T> void chkmax(T &x, T y) {x = max(x, y); } template <typename T> void chkmin(T &x, T y) {x = min(x, y); } template <typename T> void read(T &x) { x = 0; int f = 1; char c = getc...
ALGO
0.999979
3.836571
f34b8b71-2a92-4568-ad2c-d6e9fe62ab7b
Danielrocapo/Repositorio-SIS-111
practico-2/practico 4/EJERCICIO 4.cpp
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, OCaml, VB, Perl, Swift, Prolog, Javascript, Pascal, COBOL, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere ...
ALGO
0.99953
4.211664
914a374a-1706-4a41-b965-6d652d3f95c0
Schumacher-LBM/OLB
src/core/expr.cpp
#include <iostream> #include "expr.h" #include "utilities/oalgorithm.h" namespace olb { std::string Expr::Symbol::describe() const { return name; } std::size_t Expr::Symbol::size() const { return 0; } Expr::Constant::Constant(): value{} { } Expr::Constant::Constant(double x): value{x} { } std::string Exp...
TOOL
0.913356
7.20103
93a06efb-e075-486a-87a2-8d73c1c74932
vfolunin/archives-solutions
LeetCode/329.cpp
class Solution { void dfs(vector<vector<int>> &a, int y, int x, vector<vector<int>> &dist) { dist[y][x] = 1; static vector<int> dy = { -1, 0, 1, 0 }; static vector<int> dx = { 0, 1, 0, -1 }; for (int d = 0; d < dy.size(); d++) { int ty = y + dy[d]; ...
ALGO
0.999986
5.748636
5145f4d5-8274-4ddf-9ae1-91553e1cc588
tomas73/AoC-2020
20/main.cpp
#include <fstream> #include <iostream> #include <algorithm> #include <string> #include <sstream> #include <map> #include <set> #include <deque> #include <string> #include <cmath> using namespace std; void replace(char what, char with, string &str) { size_t found = 0; while ((found = str.find(what,found)) != s...
ALGO
0.999128
4.616432
01ca901b-c8bc-4a31-8066-00bf40233697
ymelon7/Cpluslearn
class/myself/wFreStl/Word.cpp
#include "Word.h" #include <fstream> #include <algorithm> #include <stdlib.h> #include <stdexcept> #include <iostream> #include <vector> using namespace std; Word::Word() { words_.clear(); stopList_.clear(); loadStopList("stoplist.txt"); } void Word::loadStopList(const string &filename) { ifstream i...
TOOL
0.915371
4.412987
2ec1c39a-6602-42d5-9144-f349563d3d0a
Wajktor/DD2360_Project
src/EMfield.cpp
#include "EMfield.h" #include <cuda.h> #include <cuda_runtime.h> /** allocate electric and magnetic field */ void field_allocate(struct grid* grd, struct EMfield* field) { // E on nodes field->Ex = newArr3<FPfield>(&field->Ex_flat, grd->nxn, grd->nyn, grd->nzn); field->Ey = newArr3<FPfield>(&field->Ey_f...
TOOL
0.905902
3.340383
25521bd6-1707-49b9-8e9a-7c270e92b37a
dandarie/sofia-info
3060.cpp
#include <iostream> using namespace std; int main() { float v; int d, t; cin >> v >> d; // d = v * t => t = d / v // v(km/h) = v(1000 metri/60 minute) => v(metri/minut) = v(km/h) / 0.06 // t(minute) = d(metri) / v(metri/minut) = d(metri) / (v(km/h) / 0.06) = 0.06 * d(metri) / v(km/h) t ...
ALGO
0.997888
3.339193