This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| //#include <cstdio> | |
| using namespace std; | |
| void Fill(int w, int h, string &str, char grid[][51]) | |
| { | |
| int i = 0, j = 0; | |
| int move_i = 0, move_j = 1; | |
| int L = -1, U = -1, R = w, D = h; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| //#include <cstdio> | |
| using namespace std; | |
| struct team_type{ | |
| bool problem_AC[13] = {0}; | |
| }team[101]; | |
| struct problem_type{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| #include <algorithm> | |
| using namespace std; | |
| char pic[51][51]; | |
| int w, h; | |
| void DFS_X(int, int); | |
| void DFS_pixel (int i, int j, int &dots) | |
| { | |
| if (pic[i][j] == 'X') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| #include <cmath> | |
| using namespace std; | |
| int main() | |
| { | |
| double B, H; | |
| const double pi = 2 * asin(1); | |
| int Case; | |
| scanf("%d", &Case); | |
| while (Case--){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| #include <algorithm> | |
| using namespace std; | |
| double a0,an1,c[3010]; | |
| int Case, N; | |
| double sum_c() | |
| { | |
| double sum = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| #include <cmath> | |
| using namespace std; | |
| typedef long long int llt; | |
| int main() | |
| { | |
| // freopen ("input.txt","rt",stdin); | |
| int H,W; | |
| while (scanf("%d%d",&H,&W) != EOF){ | |
| if (!H && !W) break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| #include <cmath> | |
| using namespace std; | |
| int main() | |
| { | |
| int Case, k; | |
| scanf("%d",&Case); | |
| while (Case--){ | |
| scanf("%d",&k); | |
| k = abs(k); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| using namespace std; | |
| int main() | |
| { | |
| int B, A, S; | |
| while (scanf("%d%d%d", &B, &A, &S) != EOF){ | |
| int carry = 0, len = 0, x = A; | |
| while (1){ | |
| int tmp = x * S + carry; | |
| carry = tmp / B; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| #include <cmath> | |
| using namespace std; | |
| int main() | |
| { | |
| int prime[80000]; | |
| int nOfprime = 2; | |
| prime[0] = 2; | |
| prime[1] = 3; | |
| for (int i = 5, gap = 2; i <= 1000000; i += gap, gap = 6-gap){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| #include <cmath> | |
| using namespace std; | |
| int main() | |
| { | |
| int N,B; | |
| while (scanf("%d%d",&N,&B) != EOF){ | |
| double digit = 0; | |
| int factor[801] = {0}; |