uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
e6667537-ca73-4c5a-9b1d-13b655de4d07
harsh2215/Baksheesh
enc_dec.cpp
#include "bits/stdc++.h" using namespace std; vector<unsigned char> key = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0 }; vector<unsigned char> plaintext = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0...
ALGO
0.999886
3.127371
5c733f8c-a5cb-445e-9e95-7366dbe76348
AbdurRoufCSE/URI-Online-Judge-Solutions
1161.cpp
#include <iostream> #include<stdio.h> using namespace std; int main() { long long int sum1=1,sum2=1,sum=0; int a,b; while((scanf("%lld%lld",&a,&b))!=EOF) { if(a==0||a==1) sum1=1; else { for(int i=2;i<=a;i++) sum1=sum1*i; } if...
ALGO
0.999572
3.472347
27c07385-0781-40bd-8f91-6c42a7262597
Rafi-Shariar/XPSC
Sheet/week_12/day 6 wed/B_Game_with_string.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int void fast(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main(){ fast(); string s; cin>>s; int c=0; int sz = s.size(); for (int i = 0; i < sz-1; i++) { if(s[i]==s[i+1]){ c++; s.erase(...
ALGO
0.999948
3.78446
b3dd86ad-e1e4-4c8f-a2de-55c3f1ac0ce8
OliverWayne007/CPP_Codes
olliePS-234.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define ull unsigned long long #define flash() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); const long long int MOD = 1e9 + 7; const long long int INF = 1e18; const long long int MAX = 1e9; void solution() { ll n; cin >> n; ...
ALGO
0.999898
4.084208
fddba538-3d28-41ce-8276-a2960b395158
aniketshahi/DSA
stackusingqueue.cpp
#include <iostream> using namespace std; class stackusingqueue { queue<int> q1; queue<int> q2; int curr_size; public: stackusingqueue() { curr_size = 0; } void push(int x) { curr_size++; q2.push(x); while (!q1.empty()) { q2.push(q1.fr...
ALGO
0.997182
4.85027
7ce6bbc9-314b-4a77-9188-6ce03af78de2
luohongyou/RemoteController
Website/taskmgr/tasklist/tasklist.cpp
// tasklist.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 #define ADDRESS "/taskmgr/tasklist.exe" #include <iostream> #include <vector> #include <algorithm> #include <Windows.h> #include <tlhelp32.h> #include <comdef.h> #include "../../../HTMLFrame/HTMLFrame.h" #pragma comment(lib, "../../../x64/Release/HTMLFrame.lib") std::...
TOOL
0.885365
4.386336
5843d775-70fe-47fd-bc5e-85ef204301e1
Mritunjay1729/Codeforces
exams.cpp
#include <iostream> using namespace std; int main() { int n, k; cin >> n >> k; int temp = 3*n-k; if(k/n>=2) printf("%d\n",(temp>0?temp:0)); else printf("0\n"); return 0; }
ALGO
0.999971
3.422373
875a2a59-ab80-4231-91d0-f0b1cffca16e
thinkphp/timus-online-judge
1083. Factorials!!!.cpp
#include <iostream> using namespace std; int n; int main(int argc, char const *argv[]) { cin>>n; char c; int k = 0; while(true){ c = getchar(); if(c=='\n'){ break; } if(c=='!')k++; } int ans = 1; while(n>0){ ans = ans * n; n = n - k; } cout<<ans; return 0; }
ALGO
0.999783
3.426409
989baad9-a3ad-4368-97a7-7dd47a8ce414
Juhaied/cpp-codes
AddUptoThatNumber/main.cpp
#include <iostream> using namespace std; int addUpTo(int n); int main() { cout<< "Enter a number : "<<endl; int num; cin>>num; int total = addUpTo(num); cout<< " SUm is = "<<total; } int addUpTo(int n) { int sum = 0; for(int i = 1;i <=n;i++){ sum += i; } return sum; }
ALGO
0.979922
3.655172
3cf67a50-d68e-4713-a02a-edb764f38658
abdussahid26/Number-Theory
Factorization using trial division.cpp
#include<bits/stdc++.h> using namespace std; void factor(int n){ for(int i=2;i<=(int)sqrt(n);i++){ while(n%i==0){ cout << i << " "; n /= i; } } if(n>1) cout << n << endl; } int main(){ int n; cin >> n; factor(n); return 0; }
ALGO
0.999967
4.93919
61da1ebf-9ca3-490b-a0b5-3a428d1c0c42
0xEbrahim/Mystery-box
LeetCode Problems/0443-string-compression/0443-string-compression.cpp
class Solution { public: int compress(vector<char>& v) { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); if(v.size()==1){ return 1; } int cnt = 0 ; int l = 0 , r = 0 ; string s=""; while(r < v.size()...
ALGO
0.999993
5.880696
d90b1e3e-5e21-4bbe-9e7f-e8285a194142
kugorang/LeetHubv2
1817-calculate-money-in-leetcode-bank/1817-calculate-money-in-leetcode-bank.cpp
class Solution { public: int totalMoney(int n) { int day = 1; int answer = 0; while (day <= n) { answer += (1 + ((day - 1) / 7) + ((day - 1) % 7)); ++day; } return answer; } };
ALGO
0.9999
4.532618
2b0271c7-877f-4cd3-a6fb-20b87f76dfb0
SakolB/PracticeProgramSolving
FerrisWheel.cpp
#include <bits/stdc++.h> using namespace std; //Solution is to sort the childWeight and then pair the heaviest with the smallest //without having it exceed the target //if it does take the heaviest child and give its it's own gondolas int main() { int n, target; cin >> n >> target; vector<int> childrenWeig...
ALGO
0.999986
4.365704
fd9b57ef-76d4-4ccf-adfe-4b029e29ddd2
FFMG/myoddweb.piger
myodd/boost/libs/compute/perf/perf_sort_by_key.cpp
#include <algorithm> #include <iostream> #include <vector> #include <boost/compute/system.hpp> #include <boost/compute/algorithm/sort_by_key.hpp> #include <boost/compute/algorithm/is_sorted.hpp> #include <boost/compute/container/vector.hpp> #include <boost/compute/types/fundamental.hpp> #include "perf.hpp" int main(...
ALGO
0.999295
5.417242
f6b6f400-2fa2-4230-a548-4a7056c03955
luckyxuanyeah/Algorithm_Practice
PAT/code/nineth/9.4/9.4 3 A1099(30)/9.4 3 A1099(30)/9.4 3 A1099(30).cpp
// 9.4 3 A1099(30).cpp : ̨Ӧóڵ㡣 // #include "stdafx.h" #include "stdio.h" #include "queue" #include "algorithm" using namespace std; const int maxn = 110; int n, orgin[maxn], num = 0; struct node{ int data; int lchild, rchild; }Node[maxn]; void inOrder(int root) { if (root == -1) return; inOrder(Node[root].lchild)...
ALGO
0.999991
4.354402
fd8538cf-1b18-4e44-b475-a126dd96883e
sondos-sami/Dynamic-Greedy-Algorithms
DP/Q5.cpp
#include <bits/stdc++.h> using namespace std; int Q5(const vector<int>& A) { int N = A.size(); vector<int> dp(N, 1); for (int i = 1; i < N; i++) { for (int j = 0; j < i; j++) { if (A[i] > A[j]) { dp[i] = max(dp[i], dp[j] + 1); } } } return *...
ALGO
0.999938
4.893265
2e10bf1b-7550-4490-8d7e-85c23407447b
mzf11125/learning-C
hardproblem1.cpp
#include <stdio.h> int main() { int T; scanf("%d", &T); for (int i = 1; i <= T; i++) { int N; scanf("%d", &N); printf("Case %d:", i); for (int i = 0; i < N; i++) { char string[101]; scanf("%s", string); // printf(" %d", P); } ...
ALGO
0.992671
3.730175
7c4c1e39-25b5-47c3-b37f-6d97694ff512
dewank07/CodeForeces-
A_Roman_and_Browser.cpp
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >> b; int c[a]; long int sum = 0, s =0, d =-10000007 ; for(int i = 0 ; i < a ; i++) { cin >> c[i]; sum+=c[i]; } for(int i = 0 ; i < b ; i++ ) { s=sum; for(int j = i ; j < a ;j+=...
ALGO
0.999938
3.481887
165c81aa-75fa-41a5-bb68-8f4b62545679
suditya/LEETCODE-Practice
is-subsequence/is-subsequence.cpp
class Solution { public: bool isSubsequence(string s, string t) { if(s.size()> t.size()) return false; else if( s.size()==t.size()) { if(s==t) return true; else return false; } else { int i=0,j=0; ...
ALGO
0.999912
6.063686
d073d41c-6e5c-4729-9663-f8944b1c818c
yosanyu/homework
Search/search.cpp
#include <iostream> #include <string> #include <cstdlib> #include <string> #include <map> #include <unordered_map> #include "search.h" using namespace std; // string's length const int GStringSize = 6; void GenerateString(string* list, int quantity) { for (int i = 0; i < quantity; i++) { string temp = ""; for (...
ALGO
0.992819
3.95162
4a05a144-5884-4fa8-930f-33ed97c696c0
falcaoanderson/CompetitiveProgramming
CSES/cses-1629.cpp
// 26/10/20 // 8:48 PM // #include <bits/stdc++.h> using namespace std; #define endl "\n" #define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL) #define pb push_back #define mp make_pair //#define int long long typedef pair<int, int> pii; const int INF = 0x3f3f3f3f; const int MAXN = (1e5) + 10; int main(...
ALGO
0.999932
4.43317
e42937db-7735-47ec-811e-efc2c8a3582b
BenavidesFlorian/robinson1
2.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> using namespace std; class Clause { private: int capa; //taille du tableau tab int n; //nombre de littéraux int* tab; //tableau contenant les littéraux /*! * Vérifie si un littéral est dans la clause courante. ...
TOOL
0.997238
4.408274
f430b24f-e04b-4f8b-ada6-7c9336026193
wenqiangwangsustech/FP16-LSRK
MenyuanEq/src_addSource_hw/src_willimson_con/src_con_med_fp/freeSurface.cpp
/*================================================================ * ESS, Southern University of Science and Technology * * File Name:propagate.cpp * Author: Wenqiang Wang, <EMAIL> * Created Time:2021-11-03 * Discription: * ================================================================*/ #include "heade...
ALGO
0.998649
3.837828
b92ac4c1-f461-4721-8ead-28d413e6856c
JamesWP/Santa---Advent-of-Code
day14/day14part2.cpp
#include <iostream> #include <fstream> #include <regex> #include <vector> #include <map> #include <tuple> #include <algorithm> int main(int argc, char const *argv[]) { std::fstream f; f.open(argv[1], std::fstream::in); const int totSeconds = 2503; //const int totSeconds = 1000; std::regex numberPattern("(...
ALGO
0.975302
3.968517
0a59b28e-a5fc-43f0-96b9-cb2099d9783b
BimaEkaSetiawan/089_Conditionalstatment
pertemuan 3(4).cpp
#include <iostream> using namespace std; float HitungRerataBerparamater(float x, float y){ return (x + y) / 2; } string CekStatusBerparamater(float a){ if (a >= 60){ return "Lulus"; } else{ return "Tidak Lulus"; } } int main() { float Ujian1, Ujian2; cout << "Masukan Nila...
ALGO
0.997969
4.037179
ad51087d-83bb-4aed-bf1b-0b9be140a068
upupming/algorithm
acwing/寒假每日一题(入门组)/week5/703. 数独检查.cpp
/* 只是检查一下合法性,比原来的搜索所有可能的解简单多了 相当于原来的搜索题里面的剪枝这个子步骤 */ #include <cstring> #include <iostream> using namespace std; const int N = 6; const int M = N * N; int t, n, m, a; // 36 位会爆 int long long row[M], col[M], cell[M]; bool solve() { memset(row, 0, sizeof row); memset(col, 0, sizeof col); memset(cell, 0, size...
ALGO
0.99929
4.479748
ab104e36-753c-4463-bd11-04fe774c5e87
tofergregg/CodeReview
course/cs106b/1176/midterm/p2/student_215.cpp
string decode(string seq) { string result; Queue<string> q; for(int = 0; i< seq.size(); i++){ q.enqueue(seq[i]); } Stack<int> s; for(int = 0; i< seq.size(); i++){ string op=q.dequeue(); if(op == I){ } } return result;
ALGO
0.999522
3.674566
9a50cfc9-c31a-48e9-b418-29ec228b1cec
KaiDD27/IOI2024
cses/SortingAndSearch/Nested Ranges Check.cpp
#include <algorithm> #include <array> #include <iostream> #include <vector> using namespace std; using ll = long long; #define endl '\n' // Define constants for the array indices const int LEFT = 0; const int RIGHT = 1; const int INDEX = 2; vector<array<int, 3>> leftAsc; int main() { ios::sync_with_stdio(false); // ...
ALGO
0.999973
3.889702
ecef336d-5b2a-41f6-955e-4a185ca6123d
HimanshuPantwal/Leetcode
300-longest-increasing-subsequence/300-longest-increasing-subsequence.cpp
class Solution { public: int lengthOfLIS(vector<int>& nums) { vector<int>ans; for(int i=0;i<nums.size();i++){ if(ans.size()==0){ ans.push_back(nums[i]); } else{ int idx=lower_bound(ans.begin(),ans.end(),nums[i])-ans.begin(); ...
ALGO
0.99999
6.133855
3357fa8e-7d24-42c9-af40-ffac50d718e1
Arrangonsalves/Leetcode
Smallest Divisor - GFG/smallest-divisor.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: bool SumOfDiv(vector<int> &nums,int threshold,int divisor) { int sum=0; int n=nums.size(); for(int i=0;i<n...
ALGO
0.999894
5.551099
2d550a97-b574-4040-9dd0-9e54188bdf47
code-fans/books-source
基础算法/第2章_递归算法/2.1.16Jam的计数法/src/DFS/count.cpp
#include<bits/stdc++.h> using namespace std; int s,t,w,cnt; int a[30]; inline void Output() { for(int i=1; i<=w; i++) cout<<(char)('a'+a[i]-1); cout<<endl; } void Dfs(int pos) { if(pos==0) return; if(a[pos]<t-(w-pos) && (a[pos]<a[pos+1]-1 || pos==w))//λԼ { a[pos]++; for(int i=pos+1; i<=w; i...
ALGO
0.99982
3.391
7f8898c0-e2bf-4119-8222-67e1747e8fec
harshaithireddy/LeetCode-Codes
2716-prime-subtraction-operation/prime-subtraction-operation.cpp
auto init = [](){ ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); return 'c'; }(); class Solution { public: bool primeSubOperation(vector<int>& nums) { vector<int> primes; vector<bool> isPrime(1001, true); isPrime[0] = isPrime[1] = false; f...
ALGO
0.999966
5.17956
2ca0f13c-ea5b-4b13-a1e0-6b46a64fdca6
FennelDumplings/DataStructure
formwork/math/数值分析/Numerical recipes/demo/src/xcorrel.cpp
#include <iostream> #include <iomanip> #include "nr.h" using namespace std; // Driver for routine correl int main(void) { const int N=64; int i,j; DP cmp; Vec_DP data1(N),data2(N),ans(N); for (i=0;i<N;i++) { if ((i > N/2-N/8-1) && (i < N/2+N/8-1)) data1[i...
ALGO
0.999309
3.510911
9f5d202e-ddf0-4689-92c8-ea0671e99f96
franv314/competitive
olinfo/Pre-OII/monete/monete.cpp
#include <bits/stdc++.h> using namespace std; int monete(int N, int v[]) { int ma = 0; for (int i = 2; i <= N; i++) { map<int, int> freq; for (int j = i; j <= N; j += i) { freq[v[j - 1]]++; } for (auto [_, f]: freq) { ma = max(ma, f); } } ...
ALGO
0.999695
4.303363
cacc0836-9f31-48bc-a1f9-ca9503209413
mshroom15/CODING_ALL
cp/parenthesses_problem.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; stack<char> st; bool correct = true; for (char c:s){ if(c=='('||c=='{'||c=='['){ st.push(c); } else if(c==')'||c=='}'||c==']'){ if(st.empty()){ correct =fals...
ALGO
0.999956
4.747458
d516d232-afba-46bd-972e-1b55c869019c
DGPvvs/Programming-Basics-with-C-
Nested Loops - Exercise/03 Sum Prime Non Prime/03 Sum Prime Non Prime.cpp
// 03 Sum Prime Non Prime.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <sstream> #include <string> #include <climits> using namespace std; enum StrFlags { TOLOWER = 0b00000000000000000000000000000001, TOUPPER = 0b0000000000000000000000...
ALGO
0.999895
5.007174
401a3086-79f8-4f8f-9c6f-daf6e864dfef
epfl-lasa/rds
rds/src/simulator.cpp
#include "simulator.hpp" #include "rds_wrap.hpp" #include "orca_style.hpp" #include <cmath> using Geometry2D::Vec2; using AdditionalPrimitives2D::Circle; namespace RDS { void Simulator::stepEuler(float dt) { if (use_orca_style) { orca_velocities.resize(obstacles.size()); for (int i = 0; i < obstacles.siz...
ALGO
0.9984
3.076681
b0e01845-5a78-4a52-8bdb-a34648e7b4eb
dchang0524/ICPC-0
Shashliks.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define sz(x) (int)(x).size() #define rep(i, a, b) for(int i = a; i < (b); ++i) typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef unsigned long long ull; void solve() { ...
ALGO
0.998923
3.54028
2fa0b15f-7df6-46fc-91c5-facad0d52917
bhartik021/LeetHub
Mirror Tree - GFG/mirror-tree.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; /* A binary tree node has data, pointer to left child and a pointer to right child */ struct Node { int data; struct Node *left; struct Node *right; Node(int x) { data = x; left = right...
ALGO
0.999805
6.965038
8fd858ad-1c1b-4477-b86b-26230959040c
a-y-u-s-h/competitive
codechef/WCC.cpp
#include <bits/stdc++.h> int main(int argc, char const *argv[]) { int T; std::cin >> T; for (int t = 0 ; t < T; t += 1) { int X; std::string R; std::cin >> X; std::cin >> R; /* ====================================== The World Chess Championship 2022 is about to start. 14 C...
ALGO
0.999858
5.231186
e812f6db-307e-4a35-b97f-9e458fafcf0b
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/11/04/13.cpp
#include <iostream> #include <cmath> #include <vector> #include <string> #include <cstring> #include <sstream> #include <algorithm> #include <memory.h> #include <set> #include <map> #include <cstdio> #include <cassert> using namespace std; #define pb push_back #define all(c) c.begin(), c.end() #define mp(x, y) make_pai...
ALGO
0.999022
3.172923
111e2850-445e-4817-bbe6-2223f9d2952b
vell001/ORB_SLAM3_Android
app/src/main/cpp/eigen-3.4.0/bench/perf_monitoring/lazy_gemm.cpp
#include <iostream> #include <fstream> #include <vector> #include <Eigen/Core> #include "../../BenchTimer.h" using namespace Eigen; #ifndef SCALAR #error SCALAR must be defined #endif typedef SCALAR Scalar; template<typename MatA, typename MatB, typename MatC> EIGEN_DONT_INLINE void lazy_gemm(const MatA &A, const Ma...
TOOL
0.982915
6.08404
228487c4-665d-4da4-98a1-ba66b46ae1d7
Aditya-A-garwal/cses
sorting_searching/stick_lengths.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; int main(int argc, char *argv[]) { // freopen("../input.txt", "r", stdin); // freopen("../output.txt", "w", stdout); ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n; cin >> n; vector<int> ar(n); for(auto &e : ar) cin >> e; ...
ALGO
0.999963
4.505653
a846ed37-1087-440a-89f0-e70ce6dc7e50
gilbertoalexsantos/judgesolutions
Solved/SPOJ/@SPOJ 812 - Bits Trocados/812 - Bits Trocados.cpp
//Author: Gilberto Alexandre dos Santos //Website: http://br.spoj.com/problems/BIT/ #include <iostream> #include <stdlib.h> #include <stdio.h> using namespace std; int main() { short V = 0, contador = 0; while(scanf("%hd",&V) && V != 0) { short I = 0, J = 0, K = 0, L = 0; I = V / 50; ...
ALGO
0.99189
3.02616
5bc07140-f0fa-403b-914c-187407ebd446
ShraddhaRJ-22/DSA-in-Cpp
Pattern/Pattern6.cpp
/* * *** ***** ******* ********* */ #include<iostream> using namespace std; void print(int n) { for(int i = 0; i < n; i++) { // Spaces before stars for(int j = 0; j < n - i - 1; j++) { cout << " "; } // Stars for(int j = 0; j < 2 * i + 1; j++) { ...
ALGO
0.983239
4.339949
58a7da5b-103c-47cc-8def-f74fbd1e0a8a
Hiyabye/Baekjoon
27xxx/27106.cpp
#include <iostream> using namespace std; void solve(void) { int p; cin >> p; cout << (100-p)/25 << " " << (100-p)%25/10 << " " << (100-p)%25%10/5 << " " << (100-p)%25%10%5; } int main(void) { ios::sync_with_stdio(false); cin.tie(nullptr); solve(); return 0; }
ALGO
0.984865
3.701184
714b046a-deb8-4d20-a54c-7bb5ec0a3f6d
Adam-Behun/data-structures-and-algorithms
learning_cpp/1-1-intro-to-cpp/loops/for.cpp
#include <iostream> using namespace std; int main(){ double initialSavings; double interestRate; double currSavings; int i; cout << "Enter initial savings: "; cin >> initialSavings; cout << "Enter interest rate: "; cin >> interestRate; cout << endl << "Annual savings for 10 years: " << endl; c...
TOOL
0.875778
4.163264
849b5da3-9aa3-45c1-89f9-0092716f18ce
ConsciousCoder07/Hackerrank
C++/04 STL/Vector-Sort.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n, temp; cin >> n; vector<int> v; for(int i=0; i<n; i++){ cin >> temp; ...
ALGO
0.999925
3.820431
cefb9723-263f-4f38-9b6f-1408b3c41a08
H-Shen/MyCodeCollection
Hackerrank/Algorithms/Running_Time_of_Algorithm.cpp
#include <vector> #include <cstdio> using namespace std; int swapInsertSort = 0; void insertionSort(vector<int> &arr, int n) { if (n <= 1) return; int i, j; int temp; for (i = 1; i < n; i++) { temp = arr[i]; for (j = i; j > 0 && arr[j - 1] > temp; j--) { arr[j] =...
ALGO
0.999941
4.122986
a01dca5c-8e22-459a-a7d8-c47973c430ed
mdyasinahmed/CSE131-132_AlgorithmDesignAndAnalysis
CSE-132/Lab_8(04.09.23)/maxNumberOfWays.cpp
#include<bits/stdc++.h> using namespace std; int maxWays(int coins[], int m, int v) { //int dp[m+1][v+1]; vector<vector<int>>dp(m+1,vector<int>(v+1, 0)); dp[0][0] = 1; for(int i=0; i<=m; i++) { for(int j=0; j<=v; j++) { // if(i==0 && j!=0) { // dp[i][j] = 0; ...
ALGO
0.999981
5.721377
889f6840-fd38-4c8b-95fd-5be95ce09224
YoanTsvyatkov/FunctionalLanguageInterpreter
ThisFunc/ThisFunc/Parser.cpp
#include "Parser.h" ///Iterating all tokens and creating evaluation tree void Parser::parse(Lexer& l) { std::pair<std::string, TOKENS> currPair; DynamicArray<int> argArr; bool inFuncDeclaration = false; std::string funcName; int paramC = 0; while (!l.end()) { currPair = l.next(); switch (currPair.second) ...
TOOL
0.965366
3.996394
5fe1efe3-79e5-4e28-a1d4-70bd085f4eeb
Abinaya2311/DAA
day 3/reverse no recursion.cpp
#include <iostream> using namespace std; int reverseNumber(int n, int rev = 0) { if (n == 0) return rev; return reverseNumber(n / 10, rev * 10 + n % 10); } int main() { int num; cout << "Enter a number: "; cin >> num; cout << "Reverse of the number: " << reverseNumber(num) << endl; ...
ALGO
0.998641
5.227901
f349008f-93be-4f1c-803b-3227d290747a
Alex230877/ChatSTL
Sha1.cpp
#include "Sha1.h" uint cycle_shift_left(uint val, int bit_count) { return (val << bit_count | val >> (32 - bit_count)); } // uint bring_to_human_view(uint val) { return ((val & 0x000000FF) << 24) | ((val & 0x0000FF00) << 8) | ((val & 0x00FF0000) >> 8) | ((val & 0xFF000000) >> 24); } // uint* sha1(const ch...
ALGO
0.992581
4.66086
66ef0045-dcb7-489e-9efb-7c64ea47e899
tomminnich3141/HG-PX4-FIRMWARE
src/lib/controllib/BlockHighPass.cpp
/** * @file blocks.cpp * * Controller library code */ #include <math.h> #include <float.h> #include "blocks.hpp" namespace control { float BlockHighPass::update(float input) { float b = 2 * float(M_PI) * getFCut() * getDt(); float a = 1 / (1 + b); setY(a * (getY() + input - getU())); setU(input); return ge...
ALGO
0.901879
5.375122
ae53c0a4-30a6-4564-ba16-00f29b2dcc2e
Zlin0509/Zlin_ACM
_CF/CONTEST/1500-1999/1950/C.cpp
#include<bits/stdc++.h> using namespace std; void solve() { int a,b; char x; cin>>a>>x>>b; if(a>12) { a%=12; printf("%02d:%02d PM\n",a,b); } else if(a==12) { printf("%02d:%02d PM\n",a,b); } else { if(a==0) a+=12; printf("%02d:%02d AM\n...
ALGO
0.996429
3.917816
c5ee4c61-3926-4f36-85e2-121a546a6c90
jebreimo/JEBLib
JEBMath/JEBMath/Math/SquaresAndDiamonds.cpp
#include "SquaresAndDiamonds.hpp" #include <algorithm> #include <random> #include "JEBBase/Bits/Bits.hpp" #include "JEBMath/Math/Random.hpp" #include "JEBMath/Math/Utilities.hpp" namespace JEBMath { namespace Fractals { namespace { typedef double (*GetValueFunc)(JEBBase::Containers::Array2D<double>&, ...
ALGO
0.99031
6.965536
e013a851-545e-415a-8e5a-82ccdaef6f9d
gustav0leal/MonkeysLIB
solutions/Algebra/fft.cpp
const double PI = acos(-1) struct complex_t { double a {0.0}, b {0.0}; complex_t() {} complex_t(double na, double nb) : a{na}, b{nb} {} const complex_t operator+(const complex_t &c) const { return complex_t(a + c.a, b + c.b); } const complex_t operator-(const complex_t &c) const { return complex_t(...
ALGO
0.999935
3.964514
26d7da14-5756-4c67-840d-987f7c6460d9
axaish/DAA
S10Q2(Pattern).cpp
#include <stdio.h> int main() { int i, j, rows,space; printf("Enter the number of rows: "); scanf("%d", &rows); for (i = 1; i <= rows; ++i) { for(space=1;space<=rows-i;space++) printf(" "); for (j = 1; j <= i; ++j) { printf("%d ", j); } printf("\n"); } return 0; }
ALGO
0.997321
3.577736
b42cdfd0-415c-4ee3-8e86-2899abd4eecf
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/07/0702/personal_submission/cf1442b_openmi.cpp
void solve() { int n, k; std::cin >> n >> k; vi a(n), b(k), idx_a(n + 1), idx_b(n + 1, -1); rep (i, 0, n) { std::cin >> a[i]; idx_a[a[i]] = i; } rep (i, 0, k) { std::cin >> b[i]; idx_b[b[i]] = i; } int m = 0; for (int x: b) { int iax = idx_a[x]...
ALGO
0.999959
4.394458
643644b0-848c-4e39-9a69-2f9835d4ccce
Tazim43/ICPC-IUPC
ICPC-Dhaka-Preli-21/D. Lazy Squirrel.cpp
#include<bits/stdc++.h> #define FAST_IO ios_base::sync_with_stdio(false); cin.tie(NULL) #define all(x) (x).begin(), (x).end() using namespace std; const int N = 1e6+10; vector<long long> gh[N], powers1(N, 1), powers2(N, 1); long long n, tot = 0, res = 0, p1 = 127, p2 = 131, mod1 = 1e9+7, mod2 = 1e9+9; string s; void...
ALGO
0.999356
4.137797
0174b104-7918-43e4-8062-432cfcf4830d
ErenBtrk/CPPHowToProgramExercises
Chapter 6/Exercises/6.38.cpp
#include <iostream> using namespace std; void hanoiTowers(int ,int ,int ,int ); int main(){ int numberOfDisks = 0; do{ cout << "Enter number of disks : " << endl; cin >> numberOfDisks ; }while(numberOfDisks < 1); hanoiTowers(numberOfDisks,1,3,2); return 0; } void hanoiTowers(i...
ALGO
0.997555
4.702446
2f58944a-c87b-4d63-9be4-812ae971fdd8
Ahmad-AlDeeb/Problem-Solving
Codeforces/IQ Test.cpp
// Problem link: https://codeforces.com/contest/328/problem/A #include <bits/stdc++.h> #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define ll long long #define ull unsigned long long #define dd double #define ld long double #define PQ priority_queue ...
ALGO
0.999798
3.685729
66ebc7fb-620e-4db1-8706-fbd911c989ce
RedMarbles/pdt_360deg_git
src/stereo_matching/cost_volume/DisparityCostVolumeEstimator.cpp
#include "DisparityCostVolumeEstimator.hpp" #include "DisparityCostVolume.hpp" #include "stereo_matching/cost_functions.hpp" #include "helpers/get_option_value.hpp" #include "helpers/fill_multi_array.hpp" #include <boost/gil/image_view_factory.hpp> namespace doppia { using namespace boost; using namespace boost::...
ALGO
0.959759
7.177429
01f8789f-a8de-4175-b3b6-3a34485ef8b4
Taimoo-r/LeetCode
540-single-element-in-a-sorted-array/single-element-in-a-sorted-array.cpp
class Solution { public: int singleNonDuplicate(vector<int>& nums) { int n = nums.size(); if(n==1) return nums[0]; int l = 1, h = n - 2; if(nums[0]!=nums[1]) return nums[0]; if(nums[n-1]!=nums[n-2]) return nums[n-1]; while(l <= h){ int m = l + (h - l)/2; ...
ALGO
0.999737
5.607298
a42a0cee-34db-489a-b3ac-5bc18aaa894c
ajfldkvmek/algorithm_cpp
2/tree/1325.cpp
/** * 백준 1325 */ #include <bits/stdc++.h> using namespace std; int N, M; int a, b; vector<int> v[10001]; int visited[10001], mx, dp[10001]; int dfs(int here) { int ret = 1; for (int i : v[here]) { if (visited[i]) continue; visited[i] = 1; ret += dfs(i); } retu...
ALGO
0.999988
4.164682
65a6c32b-1f1b-4c16-9c95-95f4328e8456
Nih1tGupta/Leetcode-GFG
Medium/Peak element/peak-element.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends /* The function should return the index of any peak element present in the array */ // arr: input array // n: size of array class Solution { public: int peakElement(int arr[], int n) { // base if(n==1){r...
ALGO
0.999665
5.533162
93239e89-d36f-436a-83f1-04cd72934307
VladDorofeev/Contests
Spring/Ns/N3.cpp
#include <iostream> #include <exception> #include <string> #include <sstream> #include <map> #include <stack> #include <set> #include <vector> #include <algorithm> /* Грамматика: <дерево> ::= <вершина> <вершина> ::= <листовая вершина> | <нелистовая вершина> <листовая вершина> ::= <имя> () <нелист...
ALGO
0.989151
4.933654
3bf51782-b5a8-4ae3-a074-7dfa66aa2304
GlebSoftware/Eigen
bench/quat_slerp.cpp
#include <iostream> #include <Eigen/Geometry> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; template<typename Q> EIGEN_DONT_INLINE Q nlerp(const Q& a, const Q& b, typename Q::Scalar t) { return Q((a.coeffs() * (1.0-t) + b.coeffs() * t).normalized()); } template<typename Q> EIGEN_DONT_INL...
ALGO
0.996894
6.251058
145f982f-6415-4908-9643-8269c3848753
inf0craw1/algorithm
baekjoon/18870.cpp
#include <iostream> #include <vector> #include <map> #define debug if constexpr (local) std::cout #define endl '\n' #define fi first #define se second #define all(x) x.begin(),x.end() #ifdef LOCAL constexpr bool local = true; #else constexpr bool local = false; #endif typedef long long ll; typedef unsigned long long...
ALGO
0.99998
4.108737
73531d5b-8810-49e4-abf1-a906b8199ce2
Ayush-S-Rawat/CodSoft
Practice/Reverse_tree.cpp
#include <iostream> #include <stack> #include <queue> using namespace std; class Node { public: int data; Node* left; Node* right; Node() { data = 0; left = NULL; right = NULL; } Node(int x) { data = x; lef...
ALGO
0.99992
4.514422
2ab0280d-7ced-4b56-ba3a-acbb0632ec80
himanshu1469/Myleetcode
316-remove-duplicate-letters/316-remove-duplicate-letters.cpp
class Solution { public: string removeDuplicateLetters(string s) { vector<int> count(254,0); vector<bool> visited(254,false); string result = "0"; for(auto i : s) { count[i]++; } for(auto i : s) { count[i]--; if(visited[i]...
ALGO
0.999996
6.59938
c75d87fa-3c36-4c03-9399-a032c16038e5
Nishanth-GH/MyCodes
floodfill_dfs.cpp
#include <iostream> #include <cstdio> #include <vector> #include <stack> #include <queue> using namespace std; int visited[100001]; int col[100001]; vector <int> v[100001]; int ct = 0; void dfs(int start) { cout << start << "->"; visited[start] = 1; col[start] = ct; for (int i = 0; i < v[start].size(); i++) { int...
ALGO
0.999946
4.096139
4d539ecd-0b32-405a-b3fd-dafcc062220d
Lintang-up/UTS-StrukturData
folder fix Bahan percobaan/uts2.cpp
#include <iostream> #include <conio.h> #include <iomanip> #include <string.h> using namespace std; struct mahasiswa { int nim; // string nama, kelas, grade; string nama, kelas, grade; float nilai1, nilai2, nilai3, RataRata, nilaiIP; }; mahasiswa data[10]; mahasiswa data1[10]; int i; void inputdata();...
ALGO
0.998275
3.886513
e27ae0c7-d95a-4890-bcab-5862eabda8c5
asoderlind/TDDD95
howmanyzeros/howmanyzeros.cpp
/** TDDD95: Lab X - <name> * Author: Axel Söderlind * Date: 2024-01-22 * This problem is about ... */ #include <iostream> #include <vector> #include <algorithm> using namespace std; typedef long long ll; typedef long double ld; constexpr char nl = '\n'; constexpr ll INF = 0x3f3f3f3f; constexpr ll INFLL = 0x3f3...
ALGO
0.999953
5.358897
42b5c292-40d9-49a2-8ea3-5a64cb04d354
alexstoick/pbs
expo/expo.cpp
#include<fstream> #include<cmath> #include<values.h> using namespace std; ifstream in ( "expo.in" ) ; ofstream out ( "expo.out" ) ; long long h , w , n ; bool ok ( long long L ) { if ( L/h >= n ) return true ; if ( L/w >= n ) return true ; return ( ( (long long)(L/h) * (L/w) ) >= n ) ; } long long caut ( )...
ALGO
0.999827
4.057324
d5326f60-092e-4f9c-8600-0f4639c3a112
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_1713_10.cpp
#include <bits/stdc++.h> int a[100009]; int S[100009]; struct sLine { int K, B; int L, R; } lines[2000009]; int linesCnt; struct sTree { int l, r; sLine* arr; int pl, pr; int cnt; } tree[200009]; int treeSize; int BuildTree(int l, int r) { int cur = treeSize++; tree[cur].l = l; tree[cur].r = r; if (...
ALGO
0.999919
4.164233
23ad21ad-bf42-4b99-a29c-685d08d8829d
aopacloud/aopa-rtc
AopaRtcWin/third_party/duilibsource/base/network/network_util.cpp
#include "network_util.h" #include "base/util/string_util.h" #include <sstream> #include <stdlib.h> #if defined (OS_WIN) #include <nb30.h> #include <snmp.h> #include <iphlpapi.h> #include <WinSock2.h> #include <WS2tcpip.h> #pragma comment(lib, "ws2_32") #pragma comment(lib, "Snmpapi.lib") #else #include <net/if_dl.h>...
TOOL
0.875633
4.901581
dc7a4821-620d-446d-9b2d-48d87e369ce8
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_12297_3.cpp
#include <bits/stdc++.h> using namespace std; vector<long long> v; long long n; int main() { cin >> n; for (int i = 1; i <= n; i++) { long long l, e, ans, x, y; cin >> l >> e; l--; x = l / 2; y = e / 2; if (l % 2 == 1) x -= l; if (e % 2 == 1) y -= e; v.push_back(y - x); } for (in...
ALGO
0.999676
3.284342
e174ca68-b1cf-4d3e-ba1b-f58ab8b94d9f
DJMAXJOAA/TASK_C2
TASK_C2/230609 피라미드.cpp
#include <iostream> #include <cstring> #include <string> #include <vector> #include <cmath> #include <random> #include <functional> using namespace std; int main() { int n = 3; for (int i = 0; i <= n; i++) { for (int j = 0; j < n-i; j++) { cout << " "; } for (int j = 0; j <= i; j++) { cout << po...
ALGO
0.999563
3.226489
a89bc603-b827-4f69-b41e-1121c91fb70a
GuessEver/ACMICPCSolutions
Gym/100518/B/B.cpp
#include <cstdio> #include <cmath> #include <cstring> #include <algorithm> const int N = 5000 + 10; const double eps = 1e-9; int n, a[N], b[N], c[N], d[N]; int A[N], B[N], C[N], D[N]; double dp[N]; int sign(double e) { if(fabs(e) < eps) return 0; return e > 0 ? 1 : -1; } inline double calc(int A, int B, int C, in...
ALGO
0.999961
3.35636
d610dd73-62b6-44fd-8958-23deb0b6f519
Nursaya0/CreateAnEventList
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
1854872f-f1bc-4b45-b8f9-b16ae739f9ee
Landvibe-DataStructure-2024/Donghun-Mentee
week 9 practice/22_p03.cpp
#include <iostream> #include <string> #include <vector> using namespace std; class unsortedPQ { private: vector<int> pq; public: unsortedPQ() { pq.clear(); } void insert(vector<int> v) { int size = v.size(); for (int i = 0; i < size; i++) { pq.push_back(v[i]); for (int j = pq.size() - 1; j > 0; j--) {...
ALGO
0.999948
4.904756
9a9b700e-1e1e-404d-a48e-b827c0d22925
Vanilla-chan-nya/Contest_Code
CodeForces/1942/C2-2.cpp
/************************************************************** * Problem: * Author: Vanilla_chan * Date: * E-Mail: <EMAIL> **************************************************************/ #include<iostream> #include<algorithm> #include<cstdio> #include<string> #include<cstring> #include<cmath> #include<map> #inc...
ALGO
0.999903
3.119822
45fae3ed-90de-4e2f-9b78-07fe4fdb5720
DyhaCreator/programming_tasks
CodeForcesRound/926/смена/задачи/reg2.cpp
#include <iostream> int main() { unsigned long long a, k, b, m, x, l = 0, r, n; std::cin >> a >> k >> b >> m >> x; r = x; while(r - l > 1){ n = (l + r) / 2; if(a * (n - n / k) + b * (n - n / m) >= x){ r = n; } else { l = n; } } std...
ALGO
0.999934
3.8832
486786dc-99a2-4e2e-bf19-0944d02c5ef8
rudreshveerappaji/Project-Gesture-Recon
src/zm_poly.cpp
#include "zm.h" #include "zm_poly.h" #ifndef SOLARIS #include <math.h> #else #include <cmath> #endif void Polygon::calcArea() { double float_area = 0.0L; for ( int i = 0, j = n_coords-1; i < n_coords; j = i++ ) { double trap_area = ((coords[i].X()-coords[j].X())*((coords[i].Y()+coords[j].Y())))/2.0L; fl...
ALGO
0.990643
5.340891
8fc1e609-b935-4d70-822d-6f2ef92aa16c
C-H-Chien/Curvelet_Construction_on_GPU
original_code/curveletmap.cpp
#include "curveletmap.hpp" #include "curvelet.hpp" #include "edgemap.hpp" #include <set> //: constructor curveletmap::curveletmap(edgemap* EM): _EM(EM), _fullcvmap(false) { resize(EM->num_edgels()); } //: destructor curveletmap::~curveletmap() { clear(); //delete everything upon exit _EM=0; //delete the ref...
ALGO
0.987666
4.608216
1cb741b1-237a-4188-b5be-c91f024a3f0a
ishandutta2007/codeforces
lawrenceli/normal/839/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long double ld; int n, k; int a[40][40]; bool conn(int mask, int s = 0) { for (int i = 0; i < 20; i++) if (mask & 1 << i) for (int j = 0; j < 20; j++) if ((mask & 1 << j) && !a[i + s][j + s]) return 0; ...
ALGO
0.999761
3.852027
c2d4b7ca-77f0-4793-b13c-64d507ce4cb2
sachinkumarS-K/bootCamp
Day1-Patterns/10.pattern.cpp
#include<iostream> using namespace std; int main(){ int n ; cout<<"Enter the row\t"; cin >> n; for (int i = n-1; i >=0; i--){ for (int s = 0; s < n - 1-i; s++){ cout << " "; } int c = 1; for (int j = 0; j < 2 * i+1; j++){ if(j...
ALGO
0.99986
3.758918
78c16854-827a-48ed-b03c-8338d34ee009
rush0204/Leetcodes
0108-convert-sorted-array-to-binary-search-tree/0108-convert-sorted-array-to-binary-search-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.999994
6.68298
00e3af19-9d4e-486a-9b6b-8108c0548b8a
ng29/Interview-Bit-Solution
BitManipulation/NumberOf1Bits.cpp
int Solution::numSetBits(unsigned int A) { int ans=0; while(A){ ans++; A &=A-1; } return ans; }
ALGO
0.999932
5.59837
c8dae5a4-9b68-4fa2-9ea1-2ce8dfc173ab
YashKumarYK/LeetCode
637-average-of-levels-in-binary-tree/637-average-of-levels-in-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.999952
6.828201
1a28c22a-bede-42f7-a6be-2d82d5365556
raincross7/code-similarity
codes/train_code/problem147/problem147_73.cpp
#include <bits/stdc++.h> using namespace std; int main() { double n,m,a,b,c,sum=0,flag=0; string s; cin>>a>>b; if(a+b==15){ cout<<'+'<<'\n'; } else if(a*b==15){ cout<<'*'<<'\n'; } else{ cout<<'x'<<'\n'; } return 0; }
ALGO
0.999799
4.134177
d3235034-2c02-4e96-bf30-18b800382e24
lai3d/GeometricToolsEngine3p16
Source/Mathematics/GteTetrahedronKey.cpp
#include <GTEnginePCH.h> #include <Mathematics/GteTetrahedronKey.h> #include <algorithm> namespace { void Permute(int u0, int u1, int u2, int V[4]) { // Once V[0] is determined, create a permutation (V[1],V[2],V[3]) so // that (V[0],V[1],V[2],V[3]) is a positive permutation of // (v0,v1...
ALGO
0.999494
7.579835
64aeaf05-9d64-44c9-acc9-53b8ab9d7ba9
Shadowsweep/DSA_Patterns
Patterns2.cpp/InvertedHollowTriangle.cpp
#include<iostream> using namespace std; int main() { int n; cout<<"Enter n: "; cin>>n; for(int row =0;row<n;row++) { for(int col=0;col<n-row;col++) { if(row ==0 || row==n-1) { cout<<"*"; } else{ if(col==0||col==n-row-1)...
ALGO
0.999817
4.234297
0c02856d-2772-4f6b-965e-4dcd50e49b0f
DSALH1/BHAVYAM_67
Assignment06.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int data; Node* next; Node(int d) { data=d; next=NULL; } }; void dfs(int v, vector<bool>& visited, Node*a[]) { visited[v]=true; cout<<v<<" "; Node* t=a[v]->next; while(t->next) { if(...
ALGO
0.999764
4.430607
d170e19f-ff1a-424e-bdcc-9f3b585836c7
its-anmol/codingChallege
2454-largest-local-values-in-a-matrix/largest-local-values-in-a-matrix.cpp
class Solution { public: int findmax(vector<vector<int>>&grid,int i,int j){ int maxa=INT_MIN; for(int x=i;x<i+3;x++){ for(int y=j;y<j+3;y++){ maxa=max(maxa,grid[x][y]); } } return maxa; } vector<vector<int>> largestLocal(vector<vector<i...
ALGO
0.99997
5.66319
25af445b-efdc-436b-b110-6d331f98b892
iikareem/Competitive-Programming
Contest Problems/Team.cpp
#include <iostream> using namespace std; int main() { int num; std::cin >> num; int p,v,t; int sure =0; for(int i=1; i<=num; i++){ std::cin >> p; std::cin >> v; std::cin >> t; if((p && v == 1) || p && t == 1 || v && t == 1){ sure++; } } ...
ALGO
0.998956
3.928296
4f3f115c-a463-4c4b-8c04-3fb78f9104e1
zhaowenlan1779/lib2geom
src/toys/find-derivative.cpp
#include <2geom/d2.h> #include <2geom/sbasis.h> #include <2geom/sbasis-2d.h> #include <2geom/bezier-to-sbasis.h> #include <2geom/sbasis-geometric.h> #include <toys/path-cairo.h> #include <toys/toy-framework-2.h> #include <2geom/angle.h> using std::vector; using namespace Geom; using namespace std; // Author: Johan ...
ALGO
0.99682
6.21556
b712f102-6f37-4c97-9264-40a8a47a8d11
myeongjae-kim/class-concurrent-programming
lab07/prime_mt.cpp
#include <stdio.h> #include <pthread.h> #include <math.h> #define NUM_THREAD 10 int thread_ret[NUM_THREAD]; int range_start; int range_end; bool IsPrime(int n) { if (n < 2) { return false; } for (int i = 2; i <= sqrt(n); i++) { if (n % i == 0) { return false; } ...
ALGO
0.999945
4.225692
c0895188-c2ce-42be-94d3-d488d33d9a5c
ishandutta2007/codeforces
huangxiaohua/normal/1359/B.cpp
#include<bits/stdc++.h> using namespace std; char s[1055]; int i,j,k,x,y,m,n,b,w,tt,sb[155][1055],sum; int main(){ scanf("%d",&tt); for(i=1;i<=tt;i++){ scanf("%d%d%d%d",&m,&n,&x,&y); b=w=sum=0; for(j=1;j<=m;j++){ scanf("%s",&s); for(k=1;k<=n;k++){ if(s[k-1]=='*'){sb[j][k]=1;w++;} else{sb[j][k]=0;...
ALGO
0.999551
3.335472