180302_9506_약수들의 합
//https://www.acmicpc.net/problem/9506 #include #include using namespace std; void process(int n){ int ans=1; int tmp[5000]; memset(tmp, 0, sizeof(int)*5000); tmp[0]=1; int index=1; for(int i=2; i
//https://www.acmicpc.net/problem/9506 #include #include using namespace std; void process(int n){ int ans=1; int tmp[5000]; memset(tmp, 0, sizeof(int)*5000); tmp[0]=1; int index=1; for(int i=2; i
//https://www.acmicpc.net/problem/2600 #include using namespace std;bool dp[501][501];int b[3];int k[2][5];void find_dp(){ for(int i=0; i> b[0] >> b[1] >> b[2] ; find_dp(); for(int i=0; i> k[0][i] >> k[1][i]; } for(int i=0; i
//https://www.acmicpc.net/problem/1931 #include #include #include using namespace std;#define lli long long int int main() { int n; cin >> n; vector arr; for(int i=0; i> a >> b; arr.push_back(pair(b,a)); } sort(arr.begin(), arr.end()); int cnt=1; int end=arr[0].first; for(int i=1; i
//https://www.acmicpc.net/problem/1920 #include #include using namespace std;int A[100001]; bool find_x(int x,int start, int end){ int m; while(end-start>=0){ m=(end+start)/2; if(A[m]==x) return true; if(A[m]