QAQ

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<vector>
#include<algorithm>
using std::vector;
using std::sort;
int cmp(const void * x, const void * y) {
//x < y
#define datatype int
return (*((datatype *)(x))) > (*((datatype *)(y))) ? : -;
#undef datatype
}
char str[];
int l[], r[];
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif
scanf("%s", str);
int n = strlen(str);
memset(l, , sizeof(l));
if (str[] == 'Q') l[] = ;
memset(r, , sizeof(r));
if (str[n - ] == 'Q') r[n-] = ;
for (int i = ; i < n; i++) {
l[i] = l[i - ];
if (str[i] == 'Q') l[i]++;
}
for (int i = n - ; i >= ; i--) {
r[i] = r[i + ];
if (str[i] == 'Q') r[i]++;
}
int ans = ;
for (int i = ; i < n; i++) {
if (str[i] == 'A') ans += l[i] * r[i];
}
printf("%d\n", ans);
return ;
}

Ralph And His Magic Field

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<vector>
#include<algorithm>
#include <iostream>
using namespace std;
/*using std::vector;
using std::sort;*/
int cmp(const void * x, const void * y) {
//x < y
#define datatype int
return (*((datatype *)(x))) > (*((datatype *)(y))) ? : -;
#undef datatype
}
class BigNum {
#define MAXSIZEOFBIGNUM 500
#define BASE 10
#define DLEN 1
public:
int Len;
int d[MAXSIZEOFBIGNUM];
public:
BigNum(void);
BigNum(const int);
BigNum(const long long);
BigNum(const char *);
BigNum(const BigNum &);
BigNum & operator = (const BigNum &);
void clear(void);
friend istream& operator>>(istream&, BigNum&);
friend ostream& operator<<(ostream&, BigNum&);
bool operator == (const BigNum &) const;
bool operator > (const BigNum &) const;
bool operator < (const BigNum &) const;
bool operator >= (const BigNum &) const;
bool operator <= (const BigNum &) const;
BigNum operator + (const BigNum &) const;
BigNum operator - (const BigNum &) const;
BigNum operator * (const BigNum &) const;
BigNum operator / (const BigNum &) const;
BigNum operator % (const BigNum &) const;
void operator ++ (void);
void operator -- (void);
BigNum operator + (const int &) const;
BigNum operator - (const int &) const;
BigNum operator * (const int &) const;
BigNum operator / (const int &) const;
int operator % (const int &) const;
BigNum operator ^ (const int &) const;
~BigNum() {}
};
BigNum::BigNum() {
Len = ;
memset(d, , sizeof(d));
}
BigNum::BigNum(const int ops) {
int x = ops;
if (ops == ) Len = ;
else Len = ;
memset(d, , sizeof(d));
while (x) {
Len++;
d[Len] = x % BASE;
x /= BASE;
}
}
BigNum::BigNum(const long long ops) {
long long x = ops;
if (ops == ) Len = ;
else Len = ;
memset(d, , sizeof(d));
while (x) {
Len++;
d[Len] = x % BASE;
x /= BASE;
}
}
BigNum::BigNum(const char * ops) {
int L = strlen(ops) - , b = ;
memset(d, , sizeof(d));
while (ops[b] == '') {
b++;
}
Len = ;
while (L - b + >= DLEN) {
int x = ;
for (int i = L - DLEN + ; i <= L; i++) {
x = x * + ops[i] - '';
}
Len++;
d[Len] = x;
L -= DLEN;
}
int x = ;
for (int i = b; i <= L; i++) {
x = x * + ops[i] - '';
}
Len++;
d[Len] = x;
}
BigNum::BigNum(const BigNum &ops) : Len(ops.Len) {
memset(d, , sizeof(d));
for (int i = ; i <= Len; i++) {
d[i] = ops.d[i];
}
}
BigNum & BigNum::operator = (const BigNum &ops) {
memset(d, , sizeof(d));
Len = ops.Len;
for (int i = ; i <= Len; i++) {
d[i] = ops.d[i];
}
return *this;
}
void BigNum::clear(void) {
for (int i = ; i <= MAXSIZEOFBIGNUM - ; i++) {
if (d[i] < ) {
d[i] += BASE;
d[i + ]--;
}
if (d[i] >= BASE) {
d[i] -= BASE;
d[i + ]++;
}
}
for (int i = MAXSIZEOFBIGNUM - ; i >= ; i--)
if (d[i] > ) {
Len = i;
return;
}
Len = ;
}
istream& operator>>(istream &in, BigNum &ops) {
char str[MAXSIZEOFBIGNUM + ];
in >> str;
int L = strlen(str), b = ;
while (str[b] == '') {
b++;
}
ops.Len = ;
for (int i = L - ; i >= b; i--) {
ops.Len++;
ops.d[ops.Len] = str[i] - '';
}
return in;
}
ostream& operator<<(ostream& out, BigNum& ops) {
for (int i = ops.Len; i >= ; i--) {
out << ops.d[i];
}
if (ops.Len == ) {
out << "";
}
return out;
}
bool BigNum::operator == (const BigNum &ops) const {
if (Len != ops.Len) {
return false;
}
for (int i = Len; i >= ; i--)
if (d[i] != ops.d[i]) {
return false;
}
return true;
}
bool BigNum::operator > (const BigNum &ops) const {
if (Len < ops.Len) {
return false;
} else if (Len > ops.Len) {
return true;
} else {
for (int i = Len; i >= ; i--)
if (d[i] < ops.d[i]) {
return false;
} else if (d[i] > ops.d[i]) {
return true;
}
}
return false;
}
bool BigNum::operator < (const BigNum &ops) const {
if (Len < ops.Len) {
return true;
} else if (Len > ops.Len) {
return false;
} else {
for (int i = Len; i >= ; i--)
if (d[i] < ops.d[i]) {
return true;
} else if (d[i] > ops.d[i]) {
return false;
}
}
return false;
}
bool BigNum::operator >= (const BigNum &ops) const {
if (Len < ops.Len) {
return false;
} else if (Len > ops.Len) {
return true;
} else {
for (int i = Len; i >= ; i--)
if (d[i] < ops.d[i]) {
return false;
} else if (d[i] > ops.d[i]) {
return true;
}
}
return true;
}
bool BigNum::operator <= (const BigNum &ops) const {
if (Len < ops.Len) {
return true;
} else if (Len > ops.Len) {
return false;
} else {
for (int i = Len; i >= ; i--)
if (d[i] < ops.d[i]) {
return true;
} else if (d[i] > ops.d[i]) {
return false;
}
}
return true;
}
BigNum BigNum::operator + (const BigNum &ops) const {
BigNum ret(*this);
for (int i = ; i <= ops.Len; i++) {
ret.d[i] += ops.d[i];
}
ret.clear();
return ret;
}
BigNum BigNum::operator - (const BigNum &ops) const {
BigNum ret(*this);
for (int i = ops.Len; i >= ; i--) {
ret.d[i] -= ops.d[i];
}
ret.clear();
return ret;
}
BigNum BigNum::operator * (const BigNum &ops) const {
BigNum ret, now(*this);
for (int i = ; i <= now.Len; i++)
for (int j = ; j <= ops.Len; j++) {
ret.d[i + j - ] += now.d[i] * ops.d[j];
}
for (int i = ; i <= MAXSIZEOFBIGNUM - ; i++)
if (ret.d[i] >= BASE) {
ret.d[i + ] += ret.d[i] / BASE;
ret.d[i] %= BASE;
}
for (int i = MAXSIZEOFBIGNUM - ; i >= ; i--)
if (ret.d[i] > ) {
ret.Len = i;
break;
}
return ret;
}
BigNum BigNum::operator / (const BigNum &ops) const {
BigNum now = (*this), div, mod;
div.Len = now.Len;
mod.Len = ;
for (int j = now.Len; j >= ; j--) {
mod.Len++;
for (int p = mod.Len; p >= ; p--) {
mod.d[p] = mod.d[p - ];
}
mod.d[] = now.d[j];
while (mod >= ops) {
div.d[j]++;
mod = mod - ops;
}
if (mod.Len == && mod.d[] == ) {
mod.Len--;
}
}
div.clear();
mod.clear();
return div;
}
BigNum BigNum::operator % (const BigNum &ops) const {
BigNum now = (*this), div, mod;
div.Len = now.Len;
mod.Len = ;
for (int j = now.Len; j >= ; j--) {
mod.Len++;
for (int p = mod.Len; p >= ; p--) {
mod.d[p] = mod.d[p - ];
}
mod.d[] = now.d[j];
while (mod >= ops) {
div.d[j]++;
mod = mod - ops;
}
if (mod.Len == && mod.d[] == ) {
mod.Len--;
}
}
div.clear();
mod.clear();
return mod;
}
void BigNum::operator ++ (void) {
d[]++;
for (int i = ; i <= MAXSIZEOFBIGNUM - ; i++)
if (d[i] >= BASE) {
d[i] -= BASE;
d[i + ]++;
} else {
break;
}
if (d[Len + ] > ) {
Len++;
}
}
void BigNum::operator -- (void) {
d[]--;
for (int i = ; i <= MAXSIZEOFBIGNUM - ; i++)
if (d[i] < ) {
d[i] += BASE;
d[i + ]--;
} else {
break;
}
if (d[Len] == ) {
Len--;
}
}
BigNum BigNum::operator + (const int & ops) const {
BigNum ret = (*this);
ret.d[] += ops;
ret.clear();
return ret;
}
BigNum BigNum::operator - (const int & ops) const {
BigNum ret = (*this);
ret.d[] -= ops;
ret.clear();
return ret;
}
BigNum BigNum::operator * (const int & ops) const {
BigNum ret(*this);
for (int i = ; i <= ret.Len; i++) {
ret.d[i] *= ops;
}
for (int i = ; i <= MAXSIZEOFBIGNUM - ; i++)
if (ret.d[i] >= BASE) {
ret.d[i + ] += ret.d[i] / BASE;
ret.d[i] %= BASE;
}
for (int i = MAXSIZEOFBIGNUM - ; i >= ; i--)
if (ret.d[i] > ) {
ret.Len = i;
return ret;
}
ret.Len = ;
return ret;
}
BigNum BigNum::operator / (const int & ops) const {
BigNum ret;
int down = ;
for (int i = Len; i >= ; i--) {
ret.d[i] = (d[i] + down * BASE) / ops;
down = d[i] + down * BASE - ret.d[i] * ops;
}
ret.Len = Len;
while (ret.d[ret.Len] == && ret.Len > ) {
ret.Len--;
}
return ret;
}
int BigNum::operator % (const int &ops) const {
int mod = ;
for (int i = Len; i >= ; i--) {
mod = ((mod * BASE) % ops + d[i]) % ops;
}
return mod;
}
BigNum BigNum::operator ^ (const int &ops) const {
BigNum t, ret();
if (ops == ) {
return ret;
}
if (ops == ) {
return *this;
}
int m = ops, i;
while (m > ) {
t = *this;
for (i = ; (i << ) <= m; i <<= ) {
t = t * t;
}
m -= i;
ret = ret * t;
if (m == ) {
ret = ret * (*this);
}
}
return ret;
}
long long n, m;
int k;
long long ans, mi;
int x[], len;
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif
scanf("%lld%lld%d", &n, &m, &k);
if (n % != m % && k == -) {
printf("0\n");
return ;
}
BigNum bn(n), bm(m);
BigNum power;
power = (bn - ) * (bm - );
len = ;
while (power > ) {
if (power % == ) x[len++] = ;
else x[len++] = ;
power = power / ;
}
mi = , ans = ;
if (x[]) ans *= ;
for (int i = ; i < len; i++) {
mi = (mi * mi) % ;
if (x[i]) {
ans = (ans * mi) % ;
}
}
printf("%lld\n", ans);
return ;
}

Marco and GCD Sequence

最小的数应该是所有数的约数

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<vector>
#include<algorithm>
#include <iostream>
using std::vector;
using std::sort;
int cmp(const void * x, const void * y) {
//x < y
#define datatype int
return (*((datatype *)(x))) > (*((datatype *)(y))) ? : -;
#undef datatype
}
int s[];
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif
int n, m;
scanf("%d", &n);
for (int i = ; i < n; i++) {
scanf("%d", &s[i]);
}
if (n == ) {
printf("1\n%d\n", s[]);
return ;
}
for (int i = ; i < n; i++) {
if (s[i] % s[] != ) {
printf("-1\n");
return ;
}
}
printf("%d\n", * n);
for (int i = ; i < n; i++) {
printf("%d %d ", s[], s[i]);
}
return ;
}

Ralph And His Tour in Binary Country

记录每个点到子树中各个点的距离,按从小到大排序,因为这是一个完全二叉树,所以排序的时候可以直接归并。

solve(x,h)表示从x节点开始往子树中走,以h的初始happy程度最多能获得的happy。

对于每次查询,首先从A点的子节点中找,然后向A点父亲的方向扩展,直到h耗尽或走到了所有点。

#pragma comment(linker, "/STACK:102400000,102400000")
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<vector>
#include<algorithm>
#include<iostream>
#include<map>
#include<queue>
#include<string>
#include<functional>
//#include<bits/stdc++.h>
using namespace std;
typedef long long lint; lint a[];
vector<lint> G[], P[]; int cmp(const void * x, const void * y) {
#define datatype int
datatype dx = *((datatype *)(x)), dy = *((datatype *)(y));
//x < y
return dx > dy ? : -;
#undef datatype
} lint solve(int x, lint h) {
int ptr = lower_bound(G[x].begin(), G[x].end(), h) - G[x].begin();
return h * ptr - P[x][ptr - ];
} int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif
std::ios::sync_with_stdio(), cin.tie();
int n, q, dep = ;
cin >> n >> q;
for (int i = ; i <= n; i++) cin >> a[i];
while ((dep << ) <= n) dep <<= ;
for (int i = dep; i <= n; i++) {
G[i].push_back();
} while (dep > ) {
for (int i = dep >> ; i < dep; i++) {
G[i].push_back();
int j = , k = , l = i << , r = (i << ) + ;
while (j < G[l].size() && k < G[r].size()) {
if (G[l][j] + a[l] < G[r][k] + a[r]) {
G[i].push_back(G[l][j] + a[l]);
j++;
} else {
G[i].push_back(G[r][k] + a[r]);
k++;
}
}
if (j == G[l].size()) for (int p = k; p < G[r].size(); p++) G[i].push_back(G[r][p] + a[r]);
else for (int p = j; p < G[l].size(); p++) G[i].push_back(G[l][p] + a[l]);
}
dep >>= ;
}
for (int i = ; i <= n; i++) {
P[i].push_back(G[i][]);
for (int j = ; j < G[i].size(); j++) {
P[i].push_back(P[i][j - ] + G[i][j]);
}
}
int x, y;
lint h;
while (q--) {
cin >> x >> h;
if (h == ) {
cout << << endl;
continue;
}
lint ans = solve(x, h);
while (x > ) {
if (a[x] < h) {
ans += h - a[x];
h -= a[x];
} else break;
y = (x >> ) << ;
if (y == x) y++;
x = (x >> );
if (y > n) continue;
if (a[y] < h) ans += solve(y, h - a[y]);
}
cout << ans << endl;
}
return ;
}

Ralph and Mushrooms

按照题解把代码写出来了,运行超时,大方向差不多,不想再调了。

#pragma comment(linker, "/STACK:102400000,102400000")
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<vector>
#include<algorithm>
#include<iostream>
#include<map>
#include<queue>
#include<stack>
#include<string>
#include<functional>
//#include<bits/stdc++.h>
using namespace std;
typedef long long lint; class Tarjan_Algorithm {
public:
int n;
vector<int> dfn, low;
vector<bool> inStack;
vector<vector<int> > * G;
int dep;
stack<int> pStack;
vector<vector<int> > Scc;
vector<int> color;
vector<pair<int, int> > bridge;
vector<int> component; void init(vector<vector<int> > * G, int size);
void dfs(int x);
void runTarjan();
};
void Tarjan_Algorithm::init(vector<vector<int> > * Graph, int size) {
if(size < ) return; G = Graph, n = size;
dfn.clear(), low.clear(), inStack.clear(), Scc.clear(), color.clear(), bridge.clear();
dfn = vector<int>(n + , );
low = vector<int>(n + , );
inStack = vector<bool>(n + , false);
color = vector<int>(n + , );
dep = ; while(!pStack.empty()) pStack.pop();
}
void Tarjan_Algorithm::dfs(int x) {
if(x > n) return; inStack[x] = true;
dfn[x] = low[x] = ++dep;
pStack.push(x); for(int i = ; i < (*G)[x].size(); i++) {
int u = (*G)[x][i]; if(dfn[u] == ) {
dfs(u);
low[x] = min(low[x], low[u]); if(dfn[x] < low[u]) {
bridge.push_back(make_pair(x, u));
}
} else {
if(inStack[u]) low[x] = min(low[x], dfn[u]);
}
} if(low[x] == dfn[x]) {
component.clear(); while(!pStack.empty()) {
int u = pStack.top();
pStack.pop();
component.push_back(u);
color[u] = Scc.size();
inStack[u] = false; if(u == x) break;
} Scc.push_back(component);
}
}
void Tarjan_Algorithm::runTarjan() {
for(int i = ; i <= n; i++) {
if(!dfn[i]) dfs(i);
}
} int cmp(const void * x, const void * y) {
#define datatype int
datatype dx = *((datatype *)(x)), dy = *((datatype *)(y));
//x < y
return dx > dy ? : -;
#undef datatype
} vector<vector<int> > G(, vector<int>()), P(, vector<int>());
vector<vector<int> > DAG(, vector<int>()), DAGP(, vector<int>());
queue<int> q;
lint dp[];
lint s[];
bool flag[];
Tarjan_Algorithm tja; lint calc(int x) {
int ll = , rr = ; while(ll < rr) {
int mm = (ll + rr + ) / ; if(mm * (mm + ) / > x)rr = mm - ;
else ll = mm;
} return x * (lint)(ll + ) - (lint)ll * (ll + ) * (ll + ) / ;
} int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif
std::ios::sync_with_stdio(), cin.tie();
int n, m, x, y, c; while(cin >> n >> m) {
for(int i = ; i <= n; i++) G[i].clear(), P[i].clear(); for(int i = ; i < m; i++) {
cin >> x >> y >> c;
G[x].push_back(y);
P[x].push_back(c);
} tja.init(&G, n);
tja.runTarjan();
int nn = tja.Scc.size(); for(int i = ; i < nn; i++) DAG[i].clear(), DAGP[i].clear(); memset(s, , sizeof(s)); for(int i = ; i <= n; i++) {
x = tja.color[i]; for(int j = ; j < G[i].size(); j++) {
int u = G[i][j];
y = tja.color[u]; if(x != y) {
DAG[x].push_back(y);
DAGP[x].push_back(P[i][j]);
} else {
s[x] += calc(P[i][j]);
}
}
} memset(dp, , sizeof(dp));
int start;
cin >> start;
start = tja.color[start];
dp[start] = s[start]; while(!q.empty()) q.pop(); memset(flag, false, sizeof(flag));
q.push(start);
flag[start] = true; while(!q.empty()) {
int u = q.front();
q.pop();
flag[u] = false; for(int i = ; i < DAG[u].size(); i++) {
int v = DAG[u][i]; if(dp[v] < dp[u] + DAGP[u][i] + s[v]) {
dp[v] = dp[u] + DAGP[u][i] + s[v]; if(!flag[v]) {
q.push(v);
flag[v] = true;
}
}
}
} lint ans = ; for(int i = ; i < nn; i++) ans = max(ans, dp[i]); cout << ans << endl;
} return ;
}

Codeforces Round #447的更多相关文章

  1. Codeforces Round #447 (Div. 2) B. Ralph And His Magic Field 数学

    题目链接 题意:给你三个数n,m,k;让你构造出一个nm的矩阵,矩阵元素只有两个值(1,-1),且满足每行每列的乘积为k,问你多少个矩阵. 解法:首先,如果n,m奇偶不同,且k=-1时,必然无解: 设 ...

  2. Codeforces Round #447 (Div. 2) 题解 【ABCDE】

    BC都被hack的人生,痛苦. 下面是题解的表演时间: A. QAQ "QAQ" is a word to denote an expression of crying. Imag ...

  3. Codeforces Round #447 (Div. 2)

    我感觉这场CF还是比较毒的,虽然我上分了... Problem A  QAQ 题目大意:给你一个由小写字母构成的字符串,问你里面有多少个QAQ. 思路:找字符串中的A然后找两边的Q即可,可以枚举找Q, ...

  4. Codeforces Round #447 (Div. 2) 题解

    A.很水的题目,3个for循环就可以了 #include <iostream> #include <cstdio> #include <cstring> using ...

  5. Codeforces Round #447 (Div. 2) C 构造

    现在有一个长度为n的数列 n不超过4000 求出它的gcd生成set 生成方式是对<i,j> insert进去(a[i] ^ a[i+1] ... ^a[j]) i<=j 然而现在给 ...

  6. Codeforces Round #447 (Div. 2) C. Marco and GCD Sequence【构造/GCD】

    C. Marco and GCD Sequence time limit per test 1 second memory limit per test 256 megabytes input sta ...

  7. Codeforces Round #447 (Div. 2) B. Ralph And His Magic Field【数论/组合数学】

    B. Ralph And His Magic Field time limit per test 1 second memory limit per test 256 megabytes input ...

  8. Codeforces Round #447 (Div. 2) A. QAQ【三重暴力枚举】

    A. QAQ time limit per test 1 second memory limit per test 256 megabytes input standard input output ...

  9. Codeforces Round #447 (Div. 2)E. Ralph and Mushrooms

    Ralph is going to collect mushrooms in the Mushroom Forest. There are m directed paths connecting n  ...

随机推荐

  1. 浏览器内置的base64方法

    Base64是一种基于64个可打印字符来表示二进制数据的表示方法.在Base64中的可打印字符包括字母A-Z.a-z.数字0-9,这样共有62个字符,此外两个可打印符号在不同的系统中而不同(维基百科: ...

  2. count(*)实现原理+两阶段提交总结

    count(*)实现原理 不同引擎的实现: MyISAM引擎把表的总行数存在了磁盘上,执行COUNT(*)就会直接返回,效率很高: InnoDB在count(*)时,需要把数据一行一行的从引擎里面取出 ...

  3. Swoole server函数列表(转载)

    swoole_server::__construct swoole_server::set swoole_server::on swoole_server::addlistener swoole_se ...

  4. 【转载】Jmeter分布式部署测试-----远程连接多台电脑做压力性能测试

    在使用Jmeter进行接口的性能测试时,由于Jmeter 是JAVA应用,对于CPU和内存的消耗比较大,所以,当需要模拟数以万计的并发用户时,使用单台机器模拟所有的并发用户就有些力不从心,甚至会引起J ...

  5. Html 页面刷新后出现闪动

    Html 页面刷新后,或跳转后,出现闪动,抖动问题 1.查看有没有用到新字体,新字体链接位置是否存在 如: @font-face { font-family: "AvantGarde-Dem ...

  6. Python对JSON的操作 day3

    下面将为大家介绍如何使用python语言来编码和解码json对象: json串就是一个字符串,json串必须用双引号,不能使用单引号 使用json函数需要导入json库,import json 1.j ...

  7. Vue主要原理最简实现与逻辑梳理

    Vue的主要原理中主要用到了定义的这么几个函数Dep,Watcher,observer.我们来使用这几个函数简单的实现一下vue构造函数数据绑定和相互依赖部分,梳理一下它们之间的关系.省略了编译部分和 ...

  8. BZOJ 4567 [SCOI2016]背单词 (Trie树、贪心)

    题目链接: https://www.lydsy.com/JudgeOnline/problem.php?id=4567 题解: 显然答案一定小于\(n\times n\), 字符串倒过来变成前缀建Tr ...

  9. Spring Boot-springbootHelloword(一)

    什么是springboot sprng家族一个全新的框架  简化我们应用程序的创建和开发的过程,使用默认配置简化了我们以前传统的配置 springboot的特性     能够快速创建spring程序 ...

  10. JQuery dom 操作总结

    DOM 操作之获取值 获得内容 - text():设置或返回所选元素的文本内容 $("#btn1").click(function(){ alert("Text: &qu ...