uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
307562c2-ecfa-4d6f-885e-d4dcdce20a73 | epam/nfstrace | src/controller/parameters.cpp | //------------------------------------------------------------------------------
#include <iostream>
#include <memory>
#include <dirent.h>
#include <stdexcept>
#include <unistd.h>
#include "analysis/plugin.h"
#include "controller/build_info.h"
#include "controller/cmdline_args.h"
#include "controller/cmdline_parser.h... | TOOL | 0.948779 | 7.283842 |
483cedf7-c4e3-4a89-8b5d-6730ed8bcaeb | imulan/procon | aoj/vol25/2545.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pa... | ALGO | 0.999953 | 3.441316 |
c6c03a45-e541-4f67-80b7-d37109d65a1d | gidelfino/maratona | codeforces/540/540E.cpp | #include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <map>
#include <string>
#include <algorithm>
using namespace std;
struct Swap {
int a, b;
};
int n, ir = 0, iR;
int r[200005], v[200005];
long long bit[200005];
Swap s[100005];
map<int,int> mapa;
void update(int value) {
for (int i = ... | ALGO | 0.999598 | 3.593993 |
5bb89337-185f-4643-a085-d40a3fc70a8d | sraihan73/Lucene- | spatial3d/src/java/org/apache/lucene/spatial3d/geom/Vector.cpp | using namespace std;
#include "Vector.h"
namespace org::apache::lucene::spatial3d::geom
{
const double Vector::MINIMUM_ANGULAR_RESOLUTION = M_PI * MINIMUM_RESOLUTION;
const double Vector::MINIMUM_RESOLUTION_SQUARED =
MINIMUM_RESOLUTION * MINIMUM_RESOLUTION;
const double Vector::MINIMUM_RESOLUTION_CUBED =
MIN... | TOOL | 0.961212 | 7.388622 |
fc63fd29-0d8f-462e-9e95-2fe18faaac2b | Artimoni/checkers | main.cpp | #include "board.h"
#include "solver.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <windows.h>
int main() {
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
std::cout << "Программа запущена\n";
std::ifstream input("input.txt");
if (!input) {
std::cerr <... | ALGO | 0.995303 | 4.353483 |
e2c3dd2c-3971-4898-aea8-176ccca205e6 | wcysai/Calabash | 2018 Multi-University Training Contest 3/D.cpp | /*************************************************************************
> File Name: D.cpp
> Author: Roundgod
> Mail: <EMAIL>
> Created Time: 2018-07-30 12:07:25
************************************************************************/
#pragma GCC optimize(3)
#include<bits/stdc++.h>
#define MAXN 1... | ALGO | 0.999726 | 3.550841 |
f3c9d7eb-1d85-432d-966f-242d38dd1b9f | vbonnici/grafe-sim | analysis/data/p02272/s865170841.cpp | #include <bits/stdc++.h>
using namespace std;
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define vv(type, c, m, n, i) vector<vector<type>> c(m, vector<type>(n, i)... | ALGO | 0.999951 | 4.021877 |
e637796a-775a-475e-9427-c02dd34be7e9 | rafaelmoura23/mobile_flutter | exemplo_persistencia_sqlite/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.998435 | 6.76073 |
8e416dc7-6c34-4830-8d3e-84064bf0b818 | Karan-Veer-Singh/Leetcode | Arrays/179. Largest Number.cpp | class Solution {
public:
static bool compare(string a, string b)
{
return (a+b) > (b+a);
}
string largestNumber(vector<int>& nums)
{
string ans = "";
int zero = 0;
vector<string> v;
for(int i : nums){
if(i == 0)
zero+... | ALGO | 0.99997 | 6.467318 |
06025644-00bf-4ba1-ae0a-14f59aef461c | MyLeetCodeRecord/cpp-leetcode | workspace/211.添加与搜索单词-数据结构设计.cpp | /*
* @lc app=leetcode.cn id=211 lang=cpp
*
* [211] 添加与搜索单词 - 数据结构设计
*/
// @lc code=start
struct TrieNode{
TrieNode* child[26];
bool isEnd;
TrieNode(){
for(int i=0; i<26; i++)
child[i] = NULL;
isEnd = false;
}
};
class WordDictionary {
private:
TrieNode* trie;
public:... | ALGO | 0.998632 | 6.640398 |
d9cc7032-576b-41b5-95e8-c2d457fc6421 | hakomori64/atcoder | abc/29c.cpp | #include <bits/stdc++.h>
#define rep(i, n) for(ll i = 0; i < n; i++)
#define repr(i, n) for(ll i = n; i >= 0; i--)
#define inf LLONG_MAX
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
ll n;
vector<string> cand;
void dfs(string s) {
if... | ALGO | 0.999798 | 4.276775 |
347c3888-01e7-4f0c-af7e-0f7951ece7e4 | Rajbirsakib/Codeforces_Solution | 628A - EhAb AnD gCd.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int t,x;
cin>>t;
while(t--){
cin>>x;
cout<<1<<" "<<x-1<<endl;
}
return 0;
}
| ALGO | 0.999096 | 3.516459 |
c0d91a96-024c-4ced-a02b-6d7d8918ef4c | CoderOJ/contests | vjudge/c8d2/D.cpp | #include <iostream>
#include <cstdio>
#include <map>
#include <set>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <queue>
#include <cmath>
#include <cstring>
using namespace std;
#ifdef __LOCALE__
#define see(a) std::cout << #a << "=" << a << std::endl
#else
#define see(a) //std::cout << #a << "="... | ALGO | 0.995591 | 3.404783 |
8c85e917-7b03-4799-bc56-ae56a482c31b | ksb451/Cpp_DSA | CONTEST/CC/test/A.cpp | #include <bits/stdc++.h>
#include <algorithm>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cout.tie(NULL); \
cin.tie(NULL);
#define IN cin >>
#define OUT cout <<
#define nl "\n"
#define all(a) (a).begin(), (a).end()
#define pb push_back
... | ALGO | 0.999901 | 4.457829 |
0ef349a2-54f6-4c0c-9646-dd3e54f4d6d7 | Yuriel849/WaferDefectDetection | VisionApp/thirdparty/opencv_481/sources/modules/stitching/src/autocalib.cpp | #include "precomp.hpp"
#include "opencv2/core/hal/hal.hpp"
using namespace cv;
namespace {
static inline bool decomposeCholesky(double* A, size_t astep, int m)
{
if (!hal::Cholesky64f(A, astep, m, 0, 0, 0))
return false;
return true;
}
} // namespace
namespace cv {
namespace detail {
void focalsFr... | ALGO | 0.99932 | 6.453257 |
7b93c8b6-af23-4030-a1a9-2a81e4f7eef7 | mpdivecha/MPC-Project | src/Eigen-3.3/bench/sparse_trisolver.cpp |
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out
// -DNOGMM -DNOMTL
// -I /home/gael/Coding/LinearAlgebra/CSparse/... | ALGO | 0.995703 | 4.874496 |
ea5bdfd2-e6e2-4765-8a21-601dfc419b9f | raincross7/code-similarity | codes/train_code/problem051/problem051_203.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
// 1.の出力
if (a==b && b==c)
{cout << "Yes" << endl;}
// ここにプログラムを追記
else {cout << "No" << endl;}
} | ALGO | 0.999972 | 4.125352 |
d6ac97eb-54a1-41af-8eda-e64a3a3da03d | jlim78/lazy_incremental_search | src/sampler/HaltonSequence.cpp | /* Author: Leonard Bruns */
#include "lgls/sampler/HaltonSequence.hpp"
#include <ompl/util/Console.h>
#include <iostream>
#include <cmath>
#include <map>
#include <boost/math/special_functions/prime.hpp>
namespace ompl
{
namespace base
{
HaltonSequence1D::HaltonSequence1D() : i_(1), base_(2)
{... | ALGO | 0.989005 | 5.963783 |
2d4bc59b-a878-464b-a2fb-650aa1745f78 | BlancBunny/StudyCpp | InitCpp/Chapter8_Template/SwapArray.cpp | #include <stdio.h>
#include <malloc.h>
#include <memory.h>
template <class T>
void swaparray(T* a, T* b, int num) {
int size = num * sizeof(T);
void* t = malloc(size);
if (t != NULL) {
memcpy(t, a, size);
memcpy(a, b, size);
memcpy(b, t, size);
}
free(t);
}
int main() {
int a[] = { 1,2,3 }, b[] = { 4,5,6 ... | ALGO | 0.989566 | 3.877898 |
1ee495ce-e77a-4b4c-8749-f3bd538d73fe | MRTarmak/SnakeGame | src/field.cpp | #include "field.hpp"
Field::Field(Snake &snake, Printer &printer) : field(), snake(snake), printer(printer), availableCoords() {
apple = {-1, -1};
score = 0;
topScore = 0;
}
void Field::initField() {
readField();
for (int x = 0; x < fieldHeight; x++) {
for (int y = 0; y < fieldWidth; y++)... | TOOL | 0.910915 | 5.443655 |
5a4fe19e-0dcf-4565-8f60-f2b805677eb2 | kasa021/atcoder-archives | abc038/abc038_c_34667611_WA.cpp | /*
* Author: kAsA02
* Submission URL: https://atcoder.jp/contests/abc038/submissions/34667611
* Submitted at: 2022-09-07 05:53:09
* Problem URL: https://atcoder.jp/contests/abc038/tasks/abc038_c
* Result: WA
* Execution Time: 31 ms
*/
#include <bits/stdc++.h>
#include <cmath>
#if __has_include(<atcoder/all>)
... | ALGO | 0.999837 | 4.29213 |
b6aed572-ba8b-452f-9407-f88647341739 | craigsapp/improv | examples/stickImprov/drumstick.cpp | //
// Programmer: Craig Stuart Sapp <<EMAIL>>
// Creation Date: Mon Jul 17 14:40:30 PDT 2000
// Last Modified: Mon Jul 17 14:40:33 PDT 2000
// Filename: ...sig/examples/all/drumstick.cpp
// Syntax: C++; stickImprov 2.3
//
// Description: This is a template which you fill with algorithms
// ... | ALGO | 0.905563 | 6.247196 |
51cdd9df-52c9-4360-8a9c-cbfdcbc55ef5 | MrDen4lk/misis2024f-24-01-evstigneev-d-a | prj.codeforces/1873d.cpp | #include <iostream>
void solve() {
int n = 0;
int k = 0;
int answer = 0;
std:: string s = "";
std::cin >> n >> k >> s;
for (int i = 0; i < n; i++) {
if (s[i] == 'B') {
answer++;
i += k - 1;
}
}
std::cout << answer << std::endl;
}
int main()... | ALGO | 0.999089 | 3.9483 |
2a9e7930-ecf7-4a78-8762-563aba78ec0a | AnoopArpan/DSA-PROBLEMS | REVERSE INTEGER/code.cpp | class Solution {
public:
int reverse(int x) {
long reverse = 0;
while (x != 0) {
int digit = x % 10;
reverse = reverse * 10 + digit;
x = x / 10;
}
if (reverse < INT_MIN || reverse > INT_MAX) {
return 0;
}
return reverse;... | ALGO | 0.999945 | 6.044164 |
983f1bd2-1bcc-4d94-9096-0a18bff5131d | tinkunath/DSA-with-all-language | Partition_Problem/Partition_Problem.cpp | /*
PARTITION PROBLEM
The problem is to identify if a given set of n elements can be divided
into two separate subsets such that sum of elements of both the subsets
is equal.
*/
#include<bits/stdc++.h>
using namespace std;
bool check(int a[], int sum, int ind) {
if (sum == 0) {
return true;
}
if (... | ALGO | 0.999946 | 4.970332 |
441bf706-e3ea-46c2-9813-5c11b989922e | RakibulRanak/Solved-ACM-problems | Codeforces/_Chocolate Bunny CF 1407C.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FastIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
ll log2bal(ll x)
{
ll i = 1, count = 0;
while (i * 2 <= x) {
i *= 2; count++;
}
return count;
}
void solve() {
int n;
cin >> n;
int ara[n + 1];
memset(ara, 0, siz... | ALGO | 0.999984 | 3.346189 |
f38ac78a-366e-4d2c-9169-949d9d367f4d | haileykim1/Algorithm-Problem | 백준/C++/10989_수 정렬하기3.cpp | #include<iostream>
using namespace std;
int main() {
cin.tie(NULL);
ios::sync_with_stdio(false);
int natural[10001] = { 0, };
int N, input, min = 10000, max = 0;
cin >> N;
while (N--) {
cin >> input;
++natural[input];
min = input < min ? input : min;
max = input > max ? input : max;
}
for (int i = min;... | ALGO | 0.999991 | 4.021088 |
ff1c5997-9204-4c09-8c62-b75e5c5bce94 | darrennoronha75/CompetitiveCoding | problems/tuf_plus/advanced/arrays/fundamental/solved/linear_search.cpp | #include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <vector>
using namespace std;
class Solution {
public:
//Function to check if target number in array or not.
int linearSearch(vector<int>& nums, int target) {
for(int i = 0; i<size(nums); i++){
... | ALGO | 0.999902 | 6.16706 |
4c9f0d9c-ebab-400c-b68e-693218e3ac2d | ishandutta2007/codeforces | ronnie007/normal/1463/A.cpp | #include<bits/stdc++.h>
using namespace std ;
long long x , y , z ;
void input ( ) {
cin >> x >> y >> z ;
}
void solve ( ) {
long long k = min ( x , y ) ;
k = min ( k , z ) ;
long long diff = x + y + z - 3 * k ;
k *= 6 ;
if ( k > 0 && diff >= 0 ) {
if ( diff <= k ) {
if ( ... | ALGO | 0.999958 | 4.499532 |
0a78b4f6-cc86-4d01-8030-cd5a11e058fd | NazmulHasanMoon/OJ | recursion/HE_Hack_the_money.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
bool rec(ll n)
{
if(n%10==0)
if(rec(n/10)==1)return 1;
if(n%20==0)
if(rec(n/20)==1)return 1;
if(n==1)
return 1;
else
return 0;
}
int main()
{
ll n,t;
cin>>t;
bool result;
while(t--)
{
... | ALGO | 0.999759 | 3.937737 |
374ba383-800a-47ff-a327-fe40f76de344 | 5yh/leetcode | 二分/1385.cpp | class Solution
{
public:
int findTheDistanceValue(vector<int> &arr1, vector<int> &arr2, int d)
{
sort(arr2.begin(), arr2.end());
int cnt = 0;
// 找第一个大于等于x的和第一个小于x的
// 第一个大于等于的左边就是第一个小于的
for (auto &x : arr1)
{
int p = lower_bound(arr2.begin(), arr2.end(... | ALGO | 0.999967 | 5.414936 |
6cfb6ee0-3b83-4c0e-966b-855ff714558f | athaun/voxel-engine | lib/bx/src/bx.cpp | #include <bx/debug.h>
#include <bx/readerwriter.h>
#if !BX_CRT_NONE
# include <string.h> // memcpy, memmove, memset
#endif // !BX_CRT_NONE
namespace bx
{
Location Location::current(const char* _filePath, uint32_t _line)
{
return Location(_filePath, _line);
}
LocationFull LocationFull::current(const char* _func... | TOOL | 0.858977 | 6.191927 |
0339aa94-abc6-4d78-84c1-4f61de590dee | congstarcoin/congstar-core | src/core_read.cpp | #include "core_io.h"
#include "primitives/block.h"
#include "primitives/transaction.h"
#include "script/script.h"
#include "serialize.h"
#include "streams.h"
#include "univalue/univalue.h"
#include "util.h"
#include "utilstrencodings.h"
#include "version.h"
#include <boost/algorithm/string/classification.hpp>
#includ... | TOOL | 0.861556 | 7.185702 |
acaa7a09-4c08-4da5-aa1f-9afddf0ef7c0 | Dangko/webots_differential_car | src/navigation/base_local_planner/src/map_grid.cpp | #include <base_local_planner/map_grid.h>
#include <costmap_2d/cost_values.h>
using namespace std;
namespace base_local_planner{
MapGrid::MapGrid()
: size_x_(0), size_y_(0)
{
}
MapGrid::MapGrid(unsigned int size_x, unsigned int size_y)
: size_x_(size_x), size_y_(size_y)
{
commonInit();
}
M... | ALGO | 0.978858 | 5.459281 |
858cebe3-1e21-4a0f-9024-6cfefcf8e1ec | GauravZn/scheduling-algos | OPERATING SYSTEMS/System Calls/waitAndFork.cpp | #include <iostream>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <stdlib.h>
using namespace std;
int main() {
pid_t pid = fork();
if (pid == 0) {
cout << "Child process running. PID: " << getpid() << endl;
sleep(2); // simulate child work
cout << "Child pr... | TOOL | 0.889379 | 5.309436 |
b6133b96-bca0-4ef1-a258-13ae71b1e01b | rahulseetharaman/leetcode-solutions | longest-substring-with-at-most-two-distinct-characters/Solution.cpp | // https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters
class Solution {
public:
int lengthOfLongestSubstringTwoDistinct(string s) {
unordered_map<char,int>um;
int start=0;
int n=s.length();
int ans=0;
for(int i=0;i<n;i++){
um[s[... | ALGO | 0.999791 | 6.201118 |
6c8267e0-dae7-4019-9231-702ee57efc2c | ishandutta2007/codeforces | t1dus/normal/1129/D.cpp | // --------------------------------------------------<TEMPLATE>--------------------------------------------------
// --------------------<optimizations>--------------------
/*
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx,avx2,fma")
*/
// -------------------</optimizations>--------------------
/... | ALGO | 0.999986 | 4.545427 |
bc449ce0-4d2f-4c65-a213-9af1fff8de2e | iamar7/Algorithms | unclassified/conways_game_of_life/life.cpp | #include <iostream>
#include <fstream>
#include <cstdlib>
using namespace std;
// Part of Cosmos by OpenGenus Foundation
// Defines the world size parameters
const int SIZE_X = 50;
const int SIZE_Y = 160;
// Number of random cells are filled
const int number = SIZE_X*SIZE_Y/8;
void loadConfig(char world[][SIZE_Y]);
//... | ALGO | 0.999009 | 4.408412 |
6351a0c0-6f2e-4ba5-8d85-df03874c579c | cuixi521/data-structure-and-algorithms | cs5343/binary search linked list/LinkedList.cpp | #include "LinkedList.h"
#include <iostream>
using namespace std;
LinkedList::LinkedList()
{
head = NULL;
}
void LinkedList::push_back(int val)
{
Node * start = NULL;
Node * newNode = new Node(val);
start = head;
if (start == NULL)
{
head = newNode;
tail = head;
}
else
{
tail->next = newNode;
tail =... | ALGO | 0.975962 | 3.708272 |
7d78d9ba-e33f-4756-9f92-d144d7969907 | geetika353/C_CPP | String1.cpp | /* Program to compare two strings. We will use strcmp(). */
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
char key[]= "Mango";
char buffer[50];
do{
cout<<"What is my Favorite fruit?"<<endl;
cin>> buffer;
}while( strcmp(key, buffer)!= 0);
cout<<"Answ... | ALGO | 0.982918 | 4.09739 |
3c281989-7016-4a81-b080-40b68ac530c9 | lbule/android_frameworks_av-cm-12.1-mtk | media/libstagefright/codecs/amrwb/src/median5.cpp | /*
------------------------------------------------------------------------------
Filename: median5.cpp
Date: 05/08/2007
------------------------------------------------------------------------------
REVISION HISTORY
Description:
-----------------------------------------------------------------------------... | ALGO | 0.999993 | 6.069313 |
dbf7f9a9-13b1-4fd2-b7ea-48ec05f822b9 | animeshkarmakarAK/Computer-Programming | programming/coinChange.cpp | #include<bits/stdc++.h>
using namespace std;
long a,b,c,d,e,f;
long arr[1000];
int fn(int n){
if( n == 0 ) return a;
if( n == 1 ) return b;
if( n == 2 ) return c;
if( n == 3 ) return d;
if( n == 4 ) return e;
if( n == 5 ) return f;
//if(arr[n]!=-1) return arr[n];
arr[n]= ( fn(n-1... | ALGO | 0.999587 | 3.656289 |
d9ce9f89-5d40-4df6-82b6-1672b8ba2158 | oskaralund/gameoflife | src/ant.cpp | #include "ant.hpp"
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <limits>
#include <glm/gtx/rotate_vector.hpp>
#include <glm/gtc/random.hpp>
#include <glm/gtx/vector_angle.hpp>
#include <SFML/Graphics.hpp>
#include "game_of_life.hpp"
#include "tile.hpp"
namespace ants {
Ant::Ant(GameOfLife* ... | ALGO | 0.994612 | 6.324196 |
2264dc79-91c7-4ea0-a0e8-36532c881d9c | shimamura10/Atcoder | cpp/ABC351/c.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <functional>
#include <unordered_map>
#include <memory>
#include <queue>
#include <unordered_set>
#include <limits>
#include <tuple>
#include <numeric>
#include <set>
#include <random>
#include <string>
using namespace std;
using ll = long long;
using ... | ALGO | 0.999744 | 4.043108 |
44d8590b-1ea7-4866-8a88-990707ef0481 | Rithrian/Mr-Foster-BCC | Adventure1-main.cpp | //Jason Kurtz
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main() {
//welcome player
cout << "Welcome to the game!" << endl;
cout << "You encounter an unknown monster while venturing in a deep dark cave." << endl << endl;
//set up the game
int health = 10;
int counter = 0;
//s... | ALGO | 0.964395 | 4.177205 |
0feb263d-8449-4fcb-9de2-fe22e5f34db6 | ToheedAsghar/LeetCode-Problems | reDistributeCharacters.cpp | // https://leetcode.com/problems/redistribute-characters-to-make-all-strings-equal/
#include <bits/stdc++.h>
using namespace std;
bool makeEqual(vector<string>& words);
int main(){
vector<string> str = {"ab" , "a"};
cout << makeEqual(str) << endl;
return 0;
}
bool makeEqual(vector<string>& words) {
... | ALGO | 0.999932 | 5.629857 |
6a0089bc-2006-4ca8-acc7-8f2d30d6fef5 | akagiyuu/cp | spoj/square-free-integers.cpp | #include <algorithm>
#include <bits/stdc++.h>
#include <cpp-dump.hpp>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
const ll N = 1e6;
vector<ll> prime_squares;
void get_primes()
{
ll sieve[N + 1];
vector<ll> ps;
for (ll i = 2; i <= N; i++) {
if (sieve[i] == 0) {
sieve[i] = i;
ps.... | ALGO | 0.999651 | 4.665301 |
031cb3eb-d3b1-4c49-bfda-c8053e104f87 | stormbreaker07/CodingQuestions | problem set 3/codefocesless1499pro30.cpp | #include <bits/stdc++.h>
#include<iostream>
using namespace std;
int main()
{int n,m;
cin>>n>>m;
char a[n][m];
int num=0;
int mn[m];
for(int i=0;i<n;i++)
{for(int j=0;j<m;j++)
{cin>>a[i][j];}
}
for(int i=0;i<m;i++)
{num=0;
for(int j=0;j<n;j++)
{num=max(num,a[j][i]-'0');
}
mn[i]=num;
}
int c=0,a... | ALGO | 0.999809 | 3.932745 |
4090bdd2-ef33-401b-b108-3263d9f56d70 | hongttisme/cpp_oop | exercise/tutorial1/11.cpp | #include <iostream>
using namespace std;
int main(){
double percentage = 0.6;
double taxPer100 = 0.75;
double propertyActualValue;
double assessmentValue;
cout << "Enter the actual value of the property: ";
cin >> propertyActualValue;
assessmentValue = propertyActualValue * percentage;
... | TOOL | 0.987081 | 4.090435 |
4e3ea47c-9834-44a6-9b1c-0144d1db2037 | FeiWuTong/leetcode | codes/220.cpp | /*
* Approach: ordered-set (refer to #219-#2)
* Time complexity: O(nlogk) || 17.76% (40 ms)
* Space complexity: O(k) || 44.38% (11.2 MB)
* Note1: should deal with edge case: overflow
* Note2: why is unnecessary to use multiset? If we meet a same num in window,
* Note2: we will quit and return true before inser... | ALGO | 0.999854 | 6.497895 |
6efbf436-ecf1-4012-b90e-f03ce1e05f54 | abdullah-124/xpsc | week-3/day-6/G_Fall_Down.cpp | #include<bits/stdc++.h>
#define fastread() {ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);}
#define ll long long
using namespace std;
void solve(){
int n,m; cin>>n>>m;
char arr[n][m];
for(int i=0;i<n;i++){
string s; cin>>s;
for(int j=0;j<m;j++){
arr[i][j] = s[j];
... | ALGO | 0.99887 | 3.749521 |
2ed8316d-afaf-4ce4-890f-e4e621abafc9 | Fervaro1111/FFT_DENOISE | ALOE_2025_05_17/modules/LDPC5G_DECODER/src/LDPC5G_DECODER_functions.cpp | #include <iostream>
#include <memory>
#include <vector>
#include <string>
#include <aff3ct.hpp>
#include <fstream>
using namespace aff3ct;
std::unique_ptr<module::Encoder_LDPC_from_QC<>> encoder;
std::unique_ptr<module::Encoder_LDPC_from_QC<>> encoder2;
std::unique_ptr<module::Decoder_LDPC_BP_floodi... | ALGO | 0.986683 | 5.62701 |
d53910cf-28ac-44ba-a09b-c772f3f39132 | danielaso5401/laboratorio_programacion | cod/cod7.cpp | #include <iostream>
using namespace std;
int main() {
cout<<"por favor ingrese un digito \n";
char a;
cin>>a;
switch (a){
case '0': case '2': case '4': case '6': case '8':
cout<<"es para \n";
break;
case '1': case '3': case '5': case '7': case '9':
cout<<"es inpar \n";
break;
default:
c... | ALGO | 0.974959 | 3.00438 |
88955f54-e9d3-4125-84a4-180a4370490d | karrollinaaa/kody | wcześniej/złożoność/biskup_alg1.cpp | /*
* biskup_alg1.cpp
*/
#include <iostream>
int main(int argc, char **argv)
{
int a;
int i;
cout << "podaj liczbę: ";
cin >> a;
if (0 < a && a < 100) {
i = 2;
if (a == i)
cout << a << "to liczba parzysta";
else {
i = i + 2;
if (i == 100) ... | ALGO | 0.995189 | 3.393694 |
f21d8b3e-217f-43e4-84e7-55868b32fb75 | elmaakter1412/first-repo | lab_02_1.cpp | #include<bits/stdc++.h>
using namespace std;
class QUEUE{
int *ar;
int start;
int end;
int size;
int cur_sz;
public:
QUEUE(){
ar = new int[size];
start = 0;
end = -1;
this->size = size;
cur_sz = 0;
}
void ... | ALGO | 0.979821 | 4.241288 |
67a1da95-2618-4275-b539-f3579def76ce | zitengzela/TrinityCore-5.4.8 | dep/recastnavigation/Detour/Source/DetourNavMesh.cpp | #include <float.h>
#include <string.h>
#include <stdio.h>
#include "DetourNavMesh.h"
#include "DetourNode.h"
#include "DetourCommon.h"
#include "DetourMath.h"
#include "DetourAlloc.h"
#include "DetourAssert.h"
#include <new>
inline bool overlapSlabs(const float* amin, const float* amax,
const float* bmin, const... | ALGO | 0.935587 | 7.595476 |
56f3a923-2b2d-4d31-8740-3ec537c01d2c | SarvT/codetra | cpp995.cpp | class Solution {
public:
int minKBitFlips(vector<int>& nums, int k) {
int n = nums.size(), flipped = 0, res = 0;
vector<int> isFlipped(n, 0);
for (int i = 0; i < n; ++i) {
if (i >= k)flipped ^= isFlipped[i - k];
if (flipped == nums[i]) {
if (i... | ALGO | 0.999978 | 5.976248 |
c40288ce-af06-4fc9-804a-b502bcf39b5a | congmei86/leetcode | 01-GeekBand算法原理与实践/cpp/searchRange.cpp | /**
* @file searchRange.cpp
* @brief
* @author DuYong
* @date 2021-03-12
*/
class Solution {
public:
vector<int> searchRange(vector<int>& nums, int target) {
vector<int> res(2, -1);
if(nums.empty()) {
return res;
}
int left = 0, right = nums.size() - 1;
... | ALGO | 0.999976 | 6.536136 |
f1d6f336-fc91-48be-abec-fd52238f3538 | svivo2/gitrep | Foundations2/Lab13/take3/tree.cpp | //-----------------------------------------------------------
// Purpose: Implementation of BinaryTree class.
// Author: John Gauch
//-----------------------------------------------------------
#include "tree.h"
//-----------------------------------------------------------
// Constructor function.
//---------... | ALGO | 0.999511 | 5.498969 |
f8e73bfb-4179-4c50-9b5c-5c3fe9cb728c | ishandutta2007/codeforces | maspy/normal/1176/E.cpp | #line 1 "main.cpp"
#include <bits/stdc++.h>
#line 3 "/home/maspy/library/my_template.hpp"
using namespace std;
using ll = long long;
using ld = long double;
#define int ll
using pi = pair<int, int>;
using vi = vector<int>;
#define FOR(i, n) for (int i = 0; (i) < (int)(n); ++(i))
#define FOR3(i, m, n) for (int i = (m... | ALGO | 0.999842 | 5.227864 |
676fa31c-bac4-48ba-8463-7e2069b5b441 | lithces/tpps | torchsearchsorted/src/cpu/searchsorted_cpu_wrapper.cpp | #include "searchsorted_cpu_wrapper.h"
#include <stdio.h>
template<typename scalar_t>
int eval(scalar_t val, scalar_t *a, int64_t row, int64_t col, int64_t ncol, bool side_left)
{
/* Evaluates whether a[row,col] < val <= a[row, col+1]*/
if (col == ncol - 1)
{
// special case: we are on the right bord... | ALGO | 0.999895 | 6.219342 |
93bcce8f-798d-49f4-b10d-6007e45c3b01 | chengfangxiao/workstation | codeEssential/source/chapter5/ch5solutions/ch5main.cpp | /**************************************************
* Essential C++ -- Stanley Lippman
* Addison-Wesley
* ISBN 0-201-48518-4
* homepage: www.objectwrite.com
* email: <EMAIL>
*************************************************/
#include <string>
#include <iostream>
#include <vector>
using namespace std;
typedef ... | TOOL | 0.854958 | 6.149119 |
fee17fb2-c17d-4b5b-bbe8-8d9f9feb4b62 | ishandutta2007/codeforces | emptysoulist/normal/1510/D.cpp | #include<bits/stdc++.h>
using namespace std ;
#define Next( i, x ) for( int i = head[x]; i; i = e[i].next )
#define rep( i, s, t ) for( int i = (s); i <= (t); ++ i )
#define drep( i, s, t ) for( int i = (t); i >= (s); -- i )
#define mp make_pair
#define pi pair<int, int>
#define pb push_back
#define vi vector<int>
int ... | ALGO | 0.999986 | 3.302321 |
4b5c9c78-bea0-4b02-96b5-76c2716635dc | IamLJT/huawei | weightfama.cpp | /*****************************************
Name:
Data: 2017/03/12
Func: һ룬ȣֱΪm1m2
mnǿȡֱΪx1x2xn
ҪЩȥܳƳ
ͬ
******************************************/
#include <iostream>
#include <vector>
using namespace std;
int fama(int n, vector<int> weight, vector<int> nums)
{
int sum = 0, cnt = 0;
for (int i = 0; i < n; ++i)
... | ALGO | 0.999971 | 3.591191 |
51be5c6b-ed93-4bae-85c9-61a8b65ea088 | manikanta2901/ubuntu | .history/SRM/elab/DAA/SortingTechniques/SmallestFactorialNumber_20210218130714.cpp | #include<bits/stdc++.h>
#include<iostream>
using namespace std;
int GetPowerOf5(int num){
int count = 0;
while(num != 0){
if(num % 5 == 0){
count += 1;
}
num = num / 5;
}
return count;
}
int main(){
int t;
cin >> t;
while(t--){
int number;
... | ALGO | 0.999933 | 4.467745 |
862e1c03-36b0-4638-8f18-2affda5b1936 | dongho919/concept-demos | ConcurrentBST/concurrentbst.cpp | #include "concurrentbst.h"
#include <iostream>
ConcurrentBSTMap::ConcurrentBSTMap() : rootHolder(new Node()), debug(false), unlinkedNodes()
{}
ConcurrentBSTMap::~ConcurrentBSTMap()
{
deleteTree(rootHolder);
for (NodePtr& node : unlinkedNodes)
delete node;
}
std::pair<Result,V> ConcurrentBSTMap::get(K... | ALGO | 0.986889 | 6.865366 |
02cd59c3-6d14-4f31-ae58-c79b861b9608 | Xujianhong123Allen/edvs_tracking | edvs_detect_rev/dvs_renderer/src/image_tracking.cpp | // This file is part of DVS-ROS - the RPG DVS ROS Package
#include <opencv2/video/tracking.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include "dvs_renderer/image_tracking.h"
namespace dvs_renderer {
ImageTracking::ImageTracking(ros::NodeHandle & nh)
{
start_time_ = ros::Time::now().toSec();
image_transport::I... | ALGO | 0.904713 | 6.046782 |
866969be-c6f0-444a-ab9f-f140967f562c | AshishKhatkar/ICPC-Practice | Ashish/Asia_Singapore_Preliminary_Contest_2015/B.cpp | /*
ID: ashish1610
PROG:
LANG: C++
*/
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define vi vector<int>
#define vl vector<ll>
#define pii pair<int,int>
#define pil pair<int, ll>
#define pll pair<ll, ll>
#define pli pair<ll, int>
#define pb(v, a) v.push_back(a)
#define mp(... | ALGO | 0.999981 | 4.043531 |
82af729b-2c43-4245-9dae-58a048d938c5 | BigFun123/CPPCookbook | ConsoleApplication1/ConsoleApplication1.cpp | // ConsoleApplication1.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include "MathLibrary.h"
void ExampleConstCast();
int main()
{
int a, b;
std::cout << "Enter the first number:!\n";
std::cin >> a;
std::cout << "Enter the second number... | ALGO | 0.973382 | 5.337039 |
c420fe1f-0249-40c6-88b8-1bc73f1f2e7a | zhaoxx/code | top100/al.cpp | #include <iostream>
#include <limits.h>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
public:
int findKthLargest(vector<int>& nums, int k) {
vector<int> vec;
int len = nums.size();
k = len - k + 1;
for (int i=0; i... | ALGO | 0.999906 | 4.706203 |
e34021fd-5447-4149-b4cb-f5aa1cc9282f | Saad07Khan/dsa | 206deletemiddele.cpp | //find middle, store a prev that keeps track of 1 ll behind mid then delete mid
class Solution {
public:
ListNode* deleteMiddle(ListNode* head) {
if(head==NULL||head->next==NULL)return NULL;
ListNode*fast= head;
ListNode*slow = head;
ListNode* prev=NULL;
while(fast!=NULL && fa... | ALGO | 0.999949 | 5.779358 |
8c7d6019-b53a-4ee5-98f3-6c5abbcdcf61 | nisroeld99/BOJ-PS | 2666/2666.cpp | #include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int a[21];
int d[21][21][21];
int n ;
int len ;
int go (int pos , int p ,int q){
if ( pos == len+1 ){
return 0;
}
int & ret = d[pos][p][q];
if (d[pos][p][q] != -1 )
return ret;
return ret = min ( abs (p... | ALGO | 0.999915 | 3.460203 |
abeadc81-441d-4eaf-b64c-490ca9ac3a15 | Nakib-Arman/CSE318---ArtificialIntelligence | 4.DecisionTree/.history/decision_tree_20250705165914.cpp | #include<bits/stdc++.h>
using namespace std;
class Node {
string label;
unordered_map<string,Node*> children;
Node* parent;
public:
Node(string label){
this->label = label;
this->parent = NULL;
}
string getLabel(){
return label;
}
void setParent(Node* parent){... | ALGO | 0.998247 | 5.504558 |
39e09199-659e-4e02-a11a-e84708fa8669 | lbingbing/leetcode | Algorithms/p095_Unique_Binary_Search_Trees_II/p095_Unique_Binary_Search_Trees_II.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
vector<TreeNode*> generateTrees(int n) {
if(n==0) return {};
vector<vector<Tree... | ALGO | 0.999958 | 6.393898 |
2d07c489-e02c-4681-bf34-186b7bde3848 | lullabyeoytl/Codefield | codeeetwo/luogu1443(bfs模板).cpp | #include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
int n,m,x,y;
int dx[10]={0,2,1,-1,-2,-2,-1,1,2};
int dy[10]={0,1,2,2,1,-1,-2,-2,-1};
int bp[401][401];//计步数
int check[401][401];//记忆化
int bfs(int i,int j)
{
memset(bp,-1,sizeof(bp));
memset(check,0,sizeof(check));
queue <P> que;
que.... | ALGO | 0.997111 | 4.155967 |
fcb045cb-c561-4f68-b90d-e3a386a05f78 | Theyashsawarkar/Recursion | Balanced Parantheses.cpp |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
// TODO: dry run and understand the logic and the approach
// https://www.naukri.com/code360/problems/return-parentheses_920446?leftPanelTabValue=SOLUTION
// Recursive function to generate balanced parentheses.
void solve(vector<string> &a... | ALGO | 0.999757 | 6.758255 |
f0229aa9-ea4a-43ba-9227-11639f41cc7e | EvgenTen/EX3-solver-a | solver.cpp | #include "solver.hpp"
#include <complex>
#include <iostream>
using namespace std;
using solver::RealVariable;
using solver::ComplexVariable;
RealVariable& solver::operator+( RealVariable& x1, const RealVariable& x2 ){return x1;}
RealVariable& solver::operator+( RealVariable& x1, const double num){return x1;... | TOOL | 0.967356 | 3.564446 |
781c9b4c-0fd4-488e-892e-f3e77ec23559 | john-odonnell/csc_211 | assignment_03/process.cpp | #include <iostream>
#include <iomanip>
#include <math.h>
int get_diameter(int x1, int y1, int x2, int y2) {
int diffX = abs(x1 - x2);
int diffY = abs(y1 - y2);
float distance = sqrt(pow(diffX, 2) + pow(diffY, 2));
return int(distance);
}
int diameter(int x[], int y[], int length) {
int largest =... | ALGO | 0.997246 | 4.642129 |
11968497-fcab-41ed-badd-c68e6302eef6 | DevKaustubh915/Logic-Building-500-programs | program203.cpp | #include<iostream>
using namespace std;
int SumFactors(int iNo)
{
int iCnt = 0, iSum = 0;
for(iCnt = 1; iCnt < iNo; iCnt++)
{
if((iNo % iCnt) == 0)
{
iSum = iSum + iCnt;
}
}
return iSum;
}
int main()
{
int iValue = 0;
int iRet = 0;
cout<<"Enter num... | ALGO | 0.99923 | 4.344213 |
e3945add-8123-4645-9a30-345b5472de62 | ss24214859/Course-Abu-Hadhoud | 5_Algorithms_level_2/18.cpp | #include <iostream>
using namespace std;
string ReadString(string massge)
{
string Str;
cout<<massge;
cin>>Str;
return Str;
}
string EncryptText(string text,int EncryptionKey)
{
for(int i=0;i<=text.length();i++)
{
text[i]= char(int (text[i])+EncryptionKey);
}
return text;
}
s... | ALGO | 0.99961 | 3.544422 |
a1d787f0-fa00-459a-8d65-091133b16abd | jainrishabh98/CP | cf400D.cpp | #include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> ipair;
vector <ipair> g[100005];
int d[505][505];
bool vis[100005];
int mp[100005];
int c[505],s[505];
void my_dfs(int u)
{
vis[u] = true;
for (auto j:g[u])
{
if(!vis[j.first] && j.second==0)
{
my_dfs(j.first);
... | ALGO | 0.999987 | 3.396534 |
a26e9cdb-f040-4a47-8b04-a78ad33df58e | apache/harmony | drlvm/vm/jitrino/src/optimizer/escapeanalyzer.cpp | /**
* @author Intel, Pavel A. Ozhdikhin
*
*/
#include "escapeanalyzer.h"
#include "irmanager.h"
#include "Inst.h"
#include "Stl.h"
#include "BitSet.h"
namespace Jitrino {
DEFINE_SESSION_ACTION(OldEscapeAnalysisPass, old_escape, "Old Escape Analysis")
void
OldEscapeAnalysisPass::_run(IRManager& irm) {
Esca... | ALGO | 0.883799 | 7.58267 |
401c82fd-21d5-4ce3-85a5-d3e1f1f85e03 | afzalhussain23/Competitive-Programming | LightOJ/1010 - Knights in Chessboard.cpp | //Source Code Written: 5/24/15
#include <bits/stdc++.h>
using namespace std;
int main() {
//freopen("in.txt", "r", stdin);
int t, tc = 0;
scanf("%d", &t);
while(t--) {
printf("Case %d: ", ++tc);
int m, n, ans = 0;
scanf("%d %d", &m, &n);
if(m == 1 || n == 1) {
... | ALGO | 0.999821 | 5.19852 |
5ecdb409-da81-4e76-9f43-225c60ae2019 | feanorye/leetcode | 46.cpp | #include "listnode.h"
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>
using std::cout;
using std::endl;
using std::greater;... | ALGO | 0.999997 | 5.645916 |
32a37fae-c0be-4183-a3e4-cf663d783ff5 | Abhi132004/100DaysOfCode | Difficulty: Easy/Product array puzzle/product-array-puzzle.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
// User function template for C++
class Solution {
public:
vector<int> productExceptSelf(vector<int>& arr) {
// code here
int n = arr.size();
vector<int> left(n) , right(n) , prod... | ALGO | 0.998782 | 7.135795 |
31a2030b-091f-4793-b959-8ab22f827bb7 | kapil-1016/DSA | str&arr/armstrong.cpp | #include<iostream>
#include<math.h>
using namespace std;
int main(){
int n;
cout<<"enter number: ";
cin>>n;
int temp = n;
int sum = 0;
int dcount = 0;
while(temp>0){
temp = temp/10;
dcount++;
}
temp = n;
while(temp>0){
int last = temp%10;
sum = s... | ALGO | 0.999926 | 4.414149 |
9ab77bb1-5536-4e84-958b-108ee18e9acb | YoshikiTakashima/vert | benchmark/cpp_transcoder/MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE/MAXIMUM_NUMBER_OF_SQUARES_THAT_CAN_BE_FIT_IN_A_RIGHT_ANGLE_ISOSCELES_TRIANGLE.cpp | #include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <fstream>
#include <iomanip>
using namespace std;
int f_gold ( int b, int m ) {
return ( b / m - 1 ) * ( b / m ) / 2;
}
//TOFILL
int f_filled ( int b, int m ) {}
int main() {
int n_success = 0;
vector<int> param0 {40,38,47,... | ALGO | 0.999009 | 5.291131 |
80e67b9a-9a96-412b-acd9-8181681ee877 | mkt-kuno/Marlin | Marlin/src/gcode/bedlevel/abl/G29.cpp | /**
* G29.cpp - Auto Bed Leveling
*/
#include "../../../inc/MarlinConfig.h"
#if HAS_ABL_NOT_UBL
#include "../../gcode.h"
#include "../../../feature/bedlevel/bedlevel.h"
#include "../../../module/motion.h"
#include "../../../module/planner.h"
#include "../../../module/probe.h"
#include "../../queue.h"
#if ENABLED(... | ALGO | 0.980379 | 5.76196 |
59139410-e905-4cb2-b16e-dcd373e884b3 | hajimeIppo-cmd/cp-codes | Codeforces/Codeforces Round #644 (Div. 3)/F.cpp | #include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
using namespace std;
const int INF = 1e9 + 7;
const int dy[] = { 0, 0, 1, -1 };
const int dx[] = { 1, -1, 0, 0 };
int main() {
cin.tie(NULL); cout.tie(NULL);
ios_base::sync_with_stdio(false);
int T; cin >> T;
while... | ALGO | 0.999976 | 4.614435 |
bac2a678-5164-4760-853f-be29bdc4fab4 | florianMaz/synthetis-bitmap | main.cpp | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include "Headers/EasyBMP.h"
double startTime;
double endTime;
double startTimeNega;
double endTimeNega;
int col;
BMP BlackWhiteScale;
BMP OutputBlackWhiteScale;
BMP NegaScale;
BMP OutputNegaScale;
RGBApixel colorNega;
RGBApixel outputColorNega;
int picWidth;
i... | TOOL | 0.948389 | 4.888741 |
3c1f8d45-4f13-4d3a-b76c-8e30c12bf928 | Kmjng/Video_Detection | detection/opencv-4.x/3rdparty/carotene/src/meanstddev.cpp | #include "common.hpp"
#include <cmath>
namespace CAROTENE_NS {
void meanStdDev(const Size2D &size,
const u8 * srcBase, ptrdiff_t srcStride,
f32 * pMean, f32 * pStdDev)
{
internal::assertSupportedConfiguration();
#ifdef CAROTENE_NEON
f64 fsum = 0.0f, fsqsum = 0.0f;
sqsum(si... | ALGO | 0.997115 | 6.121099 |
df8523bc-d51c-4916-8f8d-5effba92dd75 | Saltykub/CP | cses/range query/prefixsum.cpp | #include<bits/stdc++.h>
#define ll long long
#define pii pair<ll,ll>
#define st first
#define nd second
#define pb push_back
using namespace std;
const int N=2e5+5;
int h[N];
struct d{
ll sum,pref;
};
d init(int val){
d res;
res.sum=val,res.pref=max(0,val);
return res;
}
d combine(d a,d b){
d res... | ALGO | 0.999936 | 4.269112 |
fb103541-c399-4b9f-b2fc-2c07aa7f7bf9 | S-boy/firmware-mod-kit | src/others/squashfs-2.2-r2-7z/p7zip/Common/CRC.cpp | // Common/CRC.cpp
#include "StdAfx.h"
#include "CRC.h"
static const UInt32 kCRCPoly = 0xEDB88320;
UInt32 CCRC::Table[256];
void CCRC::InitTable()
{
for (UInt32 i = 0; i < 256; i++)
{
UInt32 r = i;
for (int j = 0; j < 8; j++)
if (r & 1)
r = (r >> 1) ^ kCRCPoly;
else
r >... | ALGO | 0.972087 | 6.383517 |
6da43ac9-54c1-4c7d-8385-83001381b119 | Reavolt/Cpp-Primer-Plus | Chapter 12/Exercises/№6/bank.cpp | //#include "stdafx.h" --- Visual Studio --- precompiled headers
#include <iostream>
#include <ctime> // для time()
#include "queue.h"
const int MIN_PER_HR = 60;
//-------------------------------------------------------------------------------------------------
bool newcustomer(double x); // появился ли новый клиент?... | ALGO | 0.944626 | 4.279552 |
fe88b9f5-9a46-4676-9a9d-32f0a7be6f14 | ishandutta2007/codeforces | demoralizer/normal/1102/F.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)((x).size())
#d... | ALGO | 0.999974 | 4.039023 |
a6576770-d4ce-4481-8a54-a71952cb273a | VeloxChem/VeloxChem | src/t2c_nuclear_potential_geom_0X0/NuclearPotentialGeom020PrimRecFP.cpp | #include "NuclearPotentialGeom020PrimRecFP.hpp"
namespace npotrec { // npotrec namespace
auto
comp_prim_nuclear_potential_geom_020_fp(CSimdArray<double>& pbuffer,
const size_t idx_npot_geom_020_0_fp,
const size_t ... | TOOL | 0.918285 | 5.584929 |
7d52d520-5014-4c50-9e45-b501da378a7f | Lin-jingy/ACM | newcoder/2025 basic training Camp 2/M.cpp | #include <bits/stdc++.h>
#include <algorithm>
#if __GNUC__
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/priority_queue.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
template <class _KEY, class _Compare = std::less<_KEY>>
using pbds_set =
__gnu_pbds::tree<_KEY, __gnu_pbds::null_type... | ALGO | 0.999783 | 5.474146 |
316e5c83-42d2-425e-9e13-7b625c75b15f | proteus-core/libra | libra-llvm/libc/src/math/generic/coshf.cpp | #include "src/math/coshf.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/multiply_add.h"
#include "src/__support/FPUtil/rounding_mode.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/math/generic/explogxf.h"
namespace LIBC_NAMESPACE {
LLVM_LIBC_FUNCTION(float... | ALGO | 0.992992 | 6.912685 |
d8b5042e-a23e-4c69-b0c7-15151c1af862 | HomeletW/daily_leetcode | q69.cpp | /**
* 69. Sqrt(x)
* https://leetcode.com/problems/sqrtx
*
* Date: 2024-09-03
*/
#include <math.h>
#include "my_util.hpp"
using namespace std;
class Solution {
public:
int mySqrt(int x) {
if (x <= 1) {
return x;
}
// use binary search approach
int left = 1, right =... | ALGO | 0.999632 | 6.073599 |
75045615-ce14-40da-8b8a-40a9cbb24205 | sujithreddy12/CSA0638 | DAA_5-2.cpp | #include <stdio.h>
void generate_factors(int n, int start, int cur_factor) {
if (cur_factor > n) {
return;
}
if (n % cur_factor == 0) {
printf("%d ", cur_factor);
generate_factors(n, start, n / cur_factor);
}
else {
generate_factors(n, start, cur_factor + 1);
}
}... | ALGO | 0.9958 | 5.52823 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.